From b748b27a0d4a3da71095dd18bcd75a2988e78e61 Mon Sep 17 00:00:00 2001 From: Christoph Klaffl Date: Tue, 5 Nov 2019 17:30:43 +0100 Subject: [PATCH] handle FileNotFound errors properly --- findoid | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/findoid b/findoid index 48301a4..41558fb 100755 --- a/findoid +++ b/findoid @@ -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) {