From: Joey Hess Date: Mon, 13 Apr 2009 22:09:22 +0000 (-0400) Subject: avoid failure if file doesn't exist X-Git-Tag: 1.00~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb69f363b767f6f082a585bd2d2b1cf379bf7d36;p=tools%2Fpristine-tar.git 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. --- 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"); }