changeset 134:cf328bd06078

Special check for windows. What the hell.
author edogawaconan <edho@myconan.net>
date Mon, 31 Oct 2011 11:54:49 +0700
parents 2c94b1e14592
children 6a110770a756 f963d52c031a
files bin/ren
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bin/ren	Mon Oct 31 11:35:05 2011 +0700
+++ b/bin/ren	Mon Oct 31 11:54:49 2011 +0700
@@ -460,6 +460,7 @@
   $newname =~ s/^Naruto - (\d{2}) /Naruto - 0$1 /;
   $newname =~ s/^Fairy Tail - (\d{2}) /Fairy Tail - 0$1 /;
   $newname =~ s/^Naruto - (\d{2})-(\d{2}) /Naruto - 0$1-0$2 /;
+  if ($^O eq "MSWin32") { $newname =~ s/ *\\ */\\/g; }
   print(qq($_: $newname already exists, skipping\n)) and next() if -e $newname and $_ ne $newname;
   if ($_ eq $newname) {
     print("$_: no need to rename, skipping\n");