aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream-fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-stream-fs.c')
-rw-r--r--camel/camel-stream-fs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/camel/camel-stream-fs.c b/camel/camel-stream-fs.c
index 9f05b2fd8c..7047670832 100644
--- a/camel/camel-stream-fs.c
+++ b/camel/camel-stream-fs.c
@@ -313,7 +313,11 @@ stream_flush (CamelStream *stream)
static int
stream_close (CamelStream *stream)
{
- return close(((CamelStreamFs *)stream)->fd);
+ if (close (((CamelStreamFs *)stream)->fd) == -1)
+ return -1;
+
+ ((CamelStreamFs *)stream)->fd= -1;
+ return 0;
}
static off_t