diff --git a/schhist/sanitize-profile b/schhist/sanitize-profile index 5d1dd6d..c558b2d 100755 --- a/schhist/sanitize-profile +++ b/schhist/sanitize-profile @@ -68,7 +68,7 @@ for (split(",", $ENV{"SCHHIST_ADDLIBS"})) { ($file, $out) = @ARGV; &usage if $#ARGV > 1; -($dir = $file) =~ s|.*/||; +($dir = $file) =~ s|[^/]*$||; $dir = "." if $dir eq ""; open(FILE, $file) || die "$file: $!"; diff --git a/schhist/sanitize-schem b/schhist/sanitize-schem index 7948d88..5a5fd5f 100755 --- a/schhist/sanitize-schem +++ b/schhist/sanitize-schem @@ -22,7 +22,7 @@ sub usage ($file, $out) = @ARGV; &usage if $#ARGV > 1; -($dir = $file) =~ s|.*/||; +($dir = $file) =~ s|[^/]*$||; $dir = "." if $dir eq ""; open(FILE, $file) || die "$file: $!";