Merge pull request #452 from phreaker0/error-checking

handle FileNotFound errors properly
This commit is contained in:
Jim Salter 2020-01-16 13:53:30 -05:00 committed by GitHub
commit 02c38026c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {