# Some shared sub routines
#
# Author: Patrick Canterino <patshaping@gmx.net>
-# Last modified: 2003-10-27
+# Last modified: 2003-12-02
#
use strict;
my $short_path = substr($path,length($root));
$short_path =~ tr!\\!\/!;
- $short_path = "/".$short_path unless($short_path =~ m!^/!);
+ $short_path = "/".$short_path if($short_path !~ m!^/!);
$short_path = $short_path."/" if($short_path !~ m!/$! && -d $path);
return ($path,$short_path);
# upper_path()
#
-# Truncate a path in one of the following ways:
-#
-# - If the path points to a directory, the upper directory
-# will be returned.
-# - If the path points to a file, the directory containing
-# the file will be returned.
+# Cut the last part of a path away
#
# Params: Path
#