]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Cope with file systems (e.g. FAT) that don't handle symlinks
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 3 Jan 2011 20:41:36 +0000 (21:41 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 3 Jan 2011 20:41:36 +0000 (21:41 +0100)
lockfile.c

index ef48e19a033ad07bdca9447015f9e9200e44611e..1e1d0afe6904a88803e59317e7341f2f5c2e9ae6 100644 (file)
@@ -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;