diff --git a/mycp/mycp b/mycp/mycp index e5ac5b2..e901635 100755 --- a/mycp/mycp +++ b/mycp/mycp @@ -36,6 +36,7 @@ sub backup($) { @stat = stat($file); @timestamp = localtime($stat[9]); $timestamp[5] += 1900; + if ( length($timestamp[3]) < 2 ) { $timestamp[3] = "0$timestamp[3]"; } $sfx = "$timestamp[3]$months[$timestamp[4]]$timestamp[5]"; unless ( -d "$dir/OLD" ) { mkdir "$dir/OLD", 0777 or die "Couldn't create $dir/OLD: $!\n"; } $backup = "$dir/OLD/$base.$sfx";