summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-08-18 17:46:27 +0100
committerPeter Stephenson <pws@zsh.org>2015-08-18 17:46:27 +0100
commit34be0f1fe5a2f0d240cfbc8956af70245243320a (patch)
tree00188d52f0de9872cb0ccd71b83a8594c5b6eedf
parentf8164fb647a8e7947cfde137ddd9517b2fab51c4 (diff)
downloadzsh-34be0f1fe5a2f0d240cfbc8956af70245243320a.tar.gz
zsh-34be0f1fe5a2f0d240cfbc8956af70245243320a.tar.xz
zsh-34be0f1fe5a2f0d240cfbc8956af70245243320a.zip
36232: Unmeta needed in chdir() in zchdir()
-rw-r--r--ChangeLog2
-rw-r--r--Src/compat.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d0705f8fb..2223b87c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2015-08-18  Peter Stephenson  <p.stephenson@samsung.com>
 
+	* 36232: Src/compat.c: Unmeta an additional chdir().
+
 	* 36227: Src/Builtins/sched.c, Src/Modules/datetime.c,
 	Src/Modules/stat.c, Src/builtin.c, Src/prompt.c, Src/utils.c,
 	Src/watch.c: real fix for metafication problem in ztrftime:
diff --git a/Src/compat.c b/Src/compat.c
index b3a8b063c..a0ce1823c 100644
--- a/Src/compat.c
+++ b/Src/compat.c
@@ -465,7 +465,7 @@ zchdir(char *dir)
     int currdir = -2;
 
     for (;;) {
-	if (!*dir || chdir(dir) == 0) {
+	if (!*dir || chdir(unmeta(dir)) == 0) {
 #ifdef HAVE_FCHDIR
            if (currdir >= 0)
                close(currdir);