mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-27 11:44:45 +00:00
move assert_if_modified to PVE::Tools
This commit is contained in:
parent
97ffb83b4d
commit
a345b9d584
@ -428,9 +428,7 @@ sub write_config {
|
||||
sub assert_if_modified {
|
||||
my ($cfg, $digest) = @_;
|
||||
|
||||
if ($digest && ($cfg->{digest} ne $digest)) {
|
||||
die "detected modified configuration - file change by other user? Try again.\n";
|
||||
}
|
||||
PVE::Tools::assert_if_modified($cfg->{digest}, $digest);
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -998,4 +998,12 @@ sub dir_glob_foreach {
|
||||
}
|
||||
}
|
||||
|
||||
sub assert_if_modified {
|
||||
my ($digest1, $digest2) = @_;
|
||||
|
||||
if ($digest1 && $digest2 && ($digest1 ne $digest2)) {
|
||||
die "detected modified configuration - file change by other user? Try again.\n";
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user