diff options
author | Mike Kestner <mkestner@ximian.com> | 2003-03-15 01:19:25 +0800 |
---|---|---|
committer | Mike Kestner <mkestner@src.gnome.org> | 2003-03-15 01:19:25 +0800 |
commit | 0b82cc7a34271a145a45ff7f296304e19a9315cc (patch) | |
tree | 47eae8ff4cff0dbe3a49a3742aca333ff71f6410 /e-util/e-util.c | |
parent | 7bfabd86905e8b577b2d6492b516650be5075453 (diff) | |
download | gsoc2013-evolution-0b82cc7a34271a145a45ff7f296304e19a9315cc.tar.gz gsoc2013-evolution-0b82cc7a34271a145a45ff7f296304e19a9315cc.tar.zst gsoc2013-evolution-0b82cc7a34271a145a45ff7f296304e19a9315cc.zip |
use access() like camel
2003-03-14 Mike Kestner <mkestner@ximian.com>
* gal/util/e-util.c (e_mkdir_hier): use access() like camel
2003-03-14 Mike Kestner <mkestner@ximian.com>
* gal-view-collection.c (gal_view_collection_load): check failure
on e_create_directory call and warn.
* gal-view-instance.c (save_current_view): check for failure and
warn.
svn path=/trunk/; revision=20291
Diffstat (limited to 'e-util/e-util.c')
-rw-r--r-- | e-util/e-util.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c index 6c50331011..b830f654ee 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -275,11 +275,8 @@ e_mkdir_hier(const char *path, mode_t mode) p = strchr (p + 1, '/'); if (p) *p = '\0'; - if (mkdir (copy, mode) == -1) { - switch (errno) { - case EEXIST: - break; - default: + if (access (copy, F_OK) == -1) { + if (mkdir (copy, mode) == -1) { g_free (copy); return -1; } |