diff --git a/CHANGELOG b/CHANGELOG index 60e11fd..d2a401c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,8 @@ Revision history for Lufi ?.??.? ????-??-?? + - 🐛 Check if provisioning lockfile mod time exists before using it (#208) + 0.05.2 2020-07-25 - 🔥 Remove code from abandonned feature - Fix regression introduced in 0.05.1 (#201) diff --git a/lib/Lufi.pm b/lib/Lufi.pm index 9daef2f..085d248 100644 --- a/lib/Lufi.pm +++ b/lib/Lufi.pm @@ -83,7 +83,7 @@ sub startup { my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($lockfile); # Remove the lockfile if more than 20 seconds old - if (time - $mtime > 20) { + if ($mtime && time - $mtime > 20) { unlink $lockfile if -e $lockfile; # if -e just to be sure the file hasn’t been removed while checking it } else { return;