commit
1561a9b662
|
@ -75,6 +75,15 @@ while(scalar @srcArgs > 0) {
|
||||||
$dst = shift @dstArgs;
|
$dst = shift @dstArgs;
|
||||||
$bad = "";
|
$bad = "";
|
||||||
|
|
||||||
|
for ($src, $dst) {
|
||||||
|
# Be nicer to end-users by doing ".//a/./b/.//./c" ==> "a/b/c"
|
||||||
|
s|^\./||;
|
||||||
|
s|/\./|/| while (m|/\./|);
|
||||||
|
s|//+|/|g;
|
||||||
|
# Also "a/b/../c" ==> "a/c"
|
||||||
|
1 while (s,(^|/)[^/]+/\.\./,$1,);
|
||||||
|
}
|
||||||
|
|
||||||
if ($opt_v) {
|
if ($opt_v) {
|
||||||
print "Checking rename of '$src' to '$dst'\n";
|
print "Checking rename of '$src' to '$dst'\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue