diff options
author | Michael Zucci <zucchi@src.gnome.org> | 2000-04-27 06:07:04 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-04-27 06:07:04 +0800 |
commit | 10660e5e84f753e0fdeed4b97deabaea974c1d56 (patch) | |
tree | 8f91137490747553709ca24823218cde83e99a50 /tests/test1.c | |
parent | 9f81c2c796e9e93d643eed11d9e6f7d31a9eb4d8 (diff) | |
download | gsoc2013-evolution-10660e5e84f753e0fdeed4b97deabaea974c1d56.tar.gz gsoc2013-evolution-10660e5e84f753e0fdeed4b97deabaea974c1d56.tar.zst gsoc2013-evolution-10660e5e84f753e0fdeed4b97deabaea974c1d56.zip |
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
Diffstat (limited to 'tests/test1.c')
-rw-r--r-- | tests/test1.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |