From aef5f35d2c314273e926983498a6d76667d81f54 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 3 Jan 2011 21:41:36 +0100 Subject: [PATCH] Cope with file systems (e.g. FAT) that don't handle symlinks --- lockfile.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- 2.47.2