avoid failure if file doesn't exist
authorJoey Hess <joey@gnu.kitenet.net>
Mon, 13 Apr 2009 22:09:22 +0000 (18:09 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Mon, 13 Apr 2009 22:09:22 +0000 (18:09 -0400)
This can happen if the filename is weird anf tar has encoded it.
In this case we're going to do a full sweep of the tree anyway,
so there's no need to worry.

pristine-tar

index 30e8373..e06e1cf 100755 (executable)
@@ -290,7 +290,10 @@ sub recreatetarball {
                        chmod(0755, "$tempdir/workdir/$file") ||
                                die "chmod: $!";
                }
-               utime(0, 0, "$tempdir/workdir/$file") || die "utime: $!";
+
+               if (-e "$tempdir/workdir/$file") {
+                       utime(0, 0, "$tempdir/workdir/$file") || die "utime: $file: $!";
+               }
        }
        
        # If some files couldn't be matched up with the manifest,
@@ -311,7 +314,7 @@ sub recreatetarball {
                                chmod(0755, $_) ||
                                        die "chmod: $!";
                        }
-                       utime(0, 0, $_) || die "utime: $!";
+                       utime(0, 0, $_) || die "utime: $_: $!";
                }, "$tempdir/workdir");
        }