From ab8885da53da6573d62789f07f6ebc4d75839e3c Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 5 Sep 2001 23:37:01 +0000 Subject: Fix the check for the case when mkdir() returns EEXIST to check S_ISDIR on * e-mktemp.c (get_path): Fix the check for the case when mkdir() returns EEXIST to check S_ISDIR on the right structure component. Fixes bug #8775. svn path=/trunk/; revision=12644 --- e-util/ChangeLog | 6 ++++++ e-util/e-mktemp.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 6672c30310..8c08abcd69 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,9 @@ +2001-09-05 Dan Winship + + * e-mktemp.c (get_path): Fix the check for the case when mkdir() + returns EEXIST to check S_ISDIR on the right structure component. + Fixes bug #8775. + 2001-08-31 Federico Mena Quintero * e-time-utils.c (e_time_parse_date_and_time): Added format for diff --git a/e-util/e-mktemp.c b/e-util/e-mktemp.c index e1211da15b..e532498c1d 100644 --- a/e-util/e-mktemp.c +++ b/e-util/e-mktemp.c @@ -82,7 +82,7 @@ get_path (gboolean make) } /* make sure this is a directory and belongs to us... */ - if (!S_ISDIR (st.st_dev) || st.st_uid != getuid ()) { + if (!S_ISDIR (st.st_mode) || st.st_uid != getuid ()) { /* eek! this is bad... */ g_string_free (path, TRUE); return NULL; -- cgit v1.2.3