mirror of
https://codeberg.org/scip/Crypt--PWSafe3.git
synced 2025-12-16 20:21:01 +01:00
Patching previous path (File::Copy::move is even more suitable for the task, than cp+unlink, works efficiently if temp is on the same drive and reverts to cp+unlink otherwise).
This commit is contained in:
@@ -15,7 +15,7 @@ use Digest::HMAC;
|
|||||||
use Digest::SHA;
|
use Digest::SHA;
|
||||||
use Crypt::Random qw( makerandom );
|
use Crypt::Random qw( makerandom );
|
||||||
use Data::UUID;
|
use Data::UUID;
|
||||||
use File::Copy qw(cp);
|
use File::Copy qw(copy move);
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
use FileHandle;
|
use FileHandle;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
@@ -375,8 +375,7 @@ sub save {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# well, seems to be ok :)
|
# well, seems to be ok :)
|
||||||
cp($tmpfile, $file);
|
move($tmpfile, $file);
|
||||||
unlink $tmpfile;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user