git.p6c8.net
/
devedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Small cleanup
[devedit.git]
/
modules
/
Tool.pm
diff --git
a/modules/Tool.pm
b/modules/Tool.pm
index 0b1159d5b1386e5cb990ded06bc9369bb9eeb9ce..9ba39c2690a1138f6c965045a0b045c5f85e3493 100644
(file)
--- a/
modules/Tool.pm
+++ b/
modules/Tool.pm
@@
-76,7
+76,9
@@
sub check_path($$)
# Windows allows to go upwards in a path using things like
# "..." and "...." and so on
# Windows allows to go upwards in a path using things like
# "..." and "...." and so on
- for(my $x=0;$x<length($last)-1;$x++)
+ my $count = length($last)-1;
+
+ for(my $x=0;$x<$count;$x++)
{
unless($first =~ m!^[a-z]{1}:(/|\\)$!i)
{
{
unless($first =~ m!^[a-z]{1}:(/|\\)$!i)
{
@@
-87,10
+89,7
@@
sub check_path($$)
$last = '';
}
$last = '';
}
- $path = $first.'/'.$last;
-
- $first = File::Spec->canonpath($first);
- $path = File::Spec->canonpath($path);
+ $path = File::Spec->canonpath($first.'/'.$last);
# Check if the path is above the root directory
# Check if the path is above the root directory
patrick-canterino.de