handle FileNotFound errors properly

This commit is contained in:
Christoph Klaffl 2019-11-05 17:30:43 +01:00
parent f745aa25a1
commit b748b27a0d
No known key found for this signature in database
GPG Key ID: 8FC1D76EED4970D2
1 changed files with 4 additions and 0 deletions

View File

@ -64,6 +64,10 @@ sub getversions {
my $filename = "$dataset/$snappath/$snap/$relpath";
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($filename);
if (!defined $size) {
next;
}
# only push to the $versions hash if this size and mtime aren't already present (simple dedupe)
my $duplicate = 0;
foreach my $version (keys %versions) {