Gitlab Community Edition Instance

Commit 0fdc7760 authored by bnachtw's avatar bnachtw
Browse files

0.6.8.1 add trailing '*' to backup path for windows again

parent b6449c45
......@@ -63,6 +63,7 @@
# 2020-02-04 0.6.7.2 typos removed
# 2020-02-05 0.6.7.3 starting to implement debug mode switch, giving some extra output on run
# 2020-02-06 0.6.8 encapsulate escaping of special characters for non-windows systems
# 2020-02-12 0.6.8.1 add trailing "*" to backup path for windows again
#
# important notes
#
......@@ -791,20 +792,26 @@ sub fork_backup_threads
# create own log file
$log_filename = $ppid . $$. $childlogapx;
$dir = File::Spec->canonpath("$actpath/#");
# cut off trailing "#", needed to preserver trailing "/" :-|
$dir =~ s{\#$}{};
# escape special characters if not running on windows
if (! ( $osname eq 'MSWin32' ) or ( $osname eq 'msys' ) )
{
$dir = File::Spec->canonpath("$actpath/#");
# cut off trailing "#", needed to preserver trailing "/" :-|
$dir =~ s{\#$}{};
# escape "$" if part of the name
$dir =~ s{\$}{\\\$}g;
# escape special [ and ] in paths
$dir =~ s{([\[\]])}{\\$1}g;
}
else
{
# add "*" at the end of path
$dir = File::Spec->canonpath("$actpath/*");
}
# backup commandline
$command = "\"$dsmcbin\" i \"$dir\" -optfile=\"$optfile\" -su=$switcher >> $log_filename 2>&1";
$command = "\"$dsmcbin\" i \"$dir\" -su=$switcher -optfile=\"$optfile\" >> $log_filename 2>&1";
if ( $debugmode == TRUE )
{ printf "%s\n", $command; }
# record commandline in childlogfile
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment