winemaker: Fix going up one directory level
André Hentschel
nerv at dawncrow.de
Tue Nov 30 16:55:59 CST 2010
dirname is not always good for going up one level, so catch the rest.
---
tools/winemaker | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/tools/winemaker b/tools/winemaker
index 200d5ce..484cf72 100755
--- a/tools/winemaker
+++ b/tools/winemaker
@@ -1810,7 +1810,11 @@ sub search_from($$)
$real_path.="./";
} elsif ($component eq "..") {
# Go up one level
- $dirname=dirname($dirname) . "/";
+ if ($dirname =~ /\.\.\/$/) {
+ $dirname.="../";
+ } else {
+ $dirname=dirname($dirname) . "/";
+ }
$real_path.="../";
} else {
# The file/directory may have been renamed before. Also try to
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list