From 10660e5e84f753e0fdeed4b97deabaea974c1d56 Mon Sep 17 00:00:00 2001 From: Michael Zucci Date: Wed, 26 Apr 2000 22:07:04 +0000 Subject: Fix the changes to the tests - open for write should use O_CREAT|O_TRUNC as well - open for read should use mode 0 svn path=/trunk/; revision=2649 --- tests/test1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/test1.c') diff --git a/tests/test1.c b/tests/test1.c index f59439e9a7..29e5f1dac1 100644 --- a/tests/test1.c +++ b/tests/test1.c @@ -7,6 +7,7 @@ #include "camel-multipart.h" #include "camel-stream.h" #include "camel-stream-fs.h" +#include "camel-data-wrapper.h" #include "camel.h" int @@ -28,8 +29,7 @@ main (int argc, char**argv) attachment_stream = NULL; } else { if (argc == 2) { - attachment_stream = camel_stream_fs_new_with_name - (argv[1], O_RDONLY, 0600); + attachment_stream = camel_stream_fs_new_with_name (argv[1], O_RDONLY, 0); if (attachment_stream == NULL) { fprintf (stderr, "Cannot open `%s'\n", argv[1]); @@ -109,7 +109,7 @@ main (int argc, char**argv) camel_medium_set_content_object (CAMEL_MEDIUM (message), CAMEL_DATA_WRAPPER (multipart)); - stream = camel_stream_fs_new_with_name ("mail1.test", O_WRONLY, 0600); + stream = camel_stream_fs_new_with_name ("mail1.test", O_WRONLY|O_TRUNC|O_CREAT, 0600); if (!stream) { printf ("could not open output file"); exit(2); -- cgit v1.2.3