From: Joel Rosdahl Date: Mon, 3 Jan 2011 20:41:36 +0000 (+0100) Subject: Cope with file systems (e.g. FAT) that don't handle symlinks X-Git-Tag: v3.1.4~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aef5f35d2c314273e926983498a6d76667d81f54;p=thirdparty%2Fccache.git Cope with file systems (e.g. FAT) that don't handle symlinks --- diff --git a/lockfile.c b/lockfile.c index ef48e19a0..1e1d0afe6 100644 --- a/lockfile.c +++ b/lockfile.c @@ -99,6 +99,14 @@ lockfile_acquire(const char *path, unsigned staleness_limit) goto out; } cc_log("lockfile_acquire: symlink %s: %s", lockfile, strerror(errno)); + if (errno == EPERM) { + /* + * The file system does not support symbolic links. We have no choice but + * to grant the lock anyway. + */ + acquired = true; + goto out; + } if (errno != EEXIST) { /* Directory doesn't exist or isn't writable? */ goto out;