Fix #208 — 🐛 Check if provisioning lockfile mod time exists before using it
This commit is contained in:
parent
7b61b6324a
commit
634707c954
|
@ -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
|
0.05.2 2020-07-25
|
||||||
- 🔥 Remove code from abandonned feature
|
- 🔥 Remove code from abandonned feature
|
||||||
- Fix regression introduced in 0.05.1 (#201)
|
- Fix regression introduced in 0.05.1 (#201)
|
||||||
|
|
|
@ -83,7 +83,7 @@ sub startup {
|
||||||
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($lockfile);
|
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
|
# 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
|
unlink $lockfile if -e $lockfile; # if -e just to be sure the file hasn’t been removed while checking it
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue