From eb69f363b767f6f082a585bd2d2b1cf379bf7d36 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 13 Apr 2009 18:09:22 -0400 Subject: [PATCH] avoid failure if file doesn't exist 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pristine-tar b/pristine-tar index 30e8373..e06e1cf 100755 --- a/pristine-tar +++ b/pristine-tar @@ -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"); } -- 2.7.4