From e943baf1c3da4ca30d0a6c2bde5cb0605576373e Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Thu, 24 May 2012 00:21:36 -0300 Subject: [PATCH] schhist/sanitize-{profile,schem}: "dirname" logic was reversed The substitution acted as "basename" instead of "dirname". --- schhist/sanitize-profile | 2 +- schhist/sanitize-schem | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: $!";