Add to use helper function to create timestamped trans files

This commit is contained in:
Ilia Rostovtsev
2020-09-09 21:21:50 +03:00
parent 25127a8f58
commit 51cf3fd018
3 changed files with 19 additions and 3 deletions

View File

@@ -300,9 +300,8 @@ if ($mode == 0) {
$file = &date_subs($path);
}
else {
my $fdate = strftime('%Y-%m-%d_%H-%M-%S', localtime());
my $ext = &has_command("gzip") ? '.tar.gz' : '.tar';
$file = &transname("backup_$fdate$ext");
$file = &transname_timestamped("backup", $ext);
}
# Get module descriptions