to keep the removal of the archive and its log file together. Signed-off-by: Fabian Ebner <f.eb...@proxmox.com> ---
New in v2 PVE/Storage.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index ac0dccd..a459572 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -1418,6 +1418,17 @@ sub archive_info { return $info; } +sub archive_remove { + my ($archive_path) = @_; + + my $dirname = dirname($archive_path); + my $archive_info = eval { archive_info($archive_path) } // {}; + my $logfn = $archive_info->{logfilename}; + + unlink $archive_path; + unlink "$dirname/$logfn" if defined($logfn); +} + sub extract_vzdump_config_tar { my ($archive, $conf_re) = @_; -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel