]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Merge branch 'maint'
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 3 Jan 2011 21:53:12 +0000 (22:53 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 3 Jan 2011 21:54:35 +0000 (22:54 +0100)
* maint:
  Cope with file systems (e.g. FAT) that don't handle symlinks
  Close file handle in create_cachedirtag on write error

Conflicts:
lockfile.c

1  2 
lockfile.c
util.c

diff --cc lockfile.c
index 404e5c1c64f24c65f3951679ff86f5f557de031d,1e1d0afe6904a88803e59317e7341f2f5c2e9ae6..abff063b3348a34fccd1a46fc0fb64e940b40e30
@@@ -106,13 -99,14 +106,21 @@@ lockfile_acquire(const char *path, unsi
                        goto out;
                }
                cc_log("lockfile_acquire: symlink %s: %s", lockfile, strerror(errno));
 +              if (errno == ENOENT) {
 +                      /* Directory doesn't exist? */
 +                      if (create_parent_dirs(lockfile) == 0) {
 +                              /* OK. Retry. */
 +                              continue;
 +                      }
 +              }
+               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;
diff --cc util.c
Simple merge