diff options
author | Keith Packard <keithp@koto.keithp.com> | 2007-10-18 05:04:39 -0700 |
---|---|---|
committer | Keith Packard <keithp@koto.keithp.com> | 2007-10-18 05:04:39 -0700 |
commit | 238489030a64fa883f8f9fc3d73247b7f7257899 (patch) | |
tree | bdfff48c378e4b37a070402d01ed013947896684 /src | |
parent | 2b0d3d8af5a83604972e4e0fe80802e448d6dd11 (diff) |
Don't use X_OK bit when checking for writable directories (bug 12438)
Some mingw versions have broken X_OK checking; instead of trying to work
around this in a system-depedent manner, simply don't bother checking for
X_OK along with W_OK as such cases are expected to be mistakes, and not
sensible access control.
Diffstat (limited to 'src')
-rw-r--r-- | src/fccache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fccache.c b/src/fccache.c index a6b532f..c43609c 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -727,7 +727,7 @@ FcMakeDirectory (const FcChar8 *dir) parent = FcStrDirname (dir); if (!parent) return FcFalse; - if (access ((char *) parent, W_OK|X_OK) == 0) + if (access ((char *) parent, F_OK) == 0) ret = mkdir ((char *) dir, 0777) == 0; else if (access ((char *) parent, F_OK) == -1) ret = FcMakeDirectory (parent) && (mkdir ((char *) dir, 0777) == 0); @@ -760,7 +760,7 @@ FcDirCacheWrite (FcCache *cache, FcConfig *config) if (!list) return FcFalse; while ((test_dir = FcStrListNext (list))) { - if (access ((char *) test_dir, W_OK|X_OK) == 0) + if (access ((char *) test_dir, W_OK) == 0) { cache_dir = test_dir; break; |