Skip to content
Browse files

Added lines for Windows to remove old replications.

  • Loading branch information...
1 parent 7425cf6 commit ebcdd1405d07fa11e54290a8d415c89a60df6b6f @chancemedia chancemedia committed Jul 5, 2010
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/functions.pl
View
12 src/functions.pl
@@ -601,9 +601,15 @@ sub mbz_run_transactions {
}
# Clean up. Remove old replication
- system("$g_rm -f replication/replication-$currep.tar.bz2");
- system("$g_rm -f replication/replication-$currep.tar");
- system("$g_rm -f -r replication/$currep");
+ if($^O eq "MSWin32") {
+ system("del \"replication/replication-$currep.tar.bz2\"");
+ system("del \"replication/replication-$currep.tar\"");
+ system("rmdir /s /y \"replication/$currep\"");
+ } else {
+ system("$g_rm -f \"replication/replication-$currep.tar.bz2\"");
+ system("$g_rm -f \"replication/replication-$currep.tar\"");
+ system("$g_rm -f -r \"replication/$currep\"");
+ }
return 1;
}

0 comments on commit ebcdd14

Please sign in to comment.
Something went wrong with that request. Please try again.