summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-08-22 15:41:31 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-08-22 15:41:31 +0000
commit9fe735e663507164a61341c998247328fa2a738b (patch)
treef749052fceb4aaad76c214b03ce5c3f76d1beee4
parentc0e501d8a53c1bc29f48c1e7cd94d6eb9601bb54 (diff)
downloadzsh-9fe735e663507164a61341c998247328fa2a738b.tar.gz
zsh-9fe735e663507164a61341c998247328fa2a738b.tar.xz
zsh-9fe735e663507164a61341c998247328fa2a738b.zip
25508: set file name if function came from dump file
-rw-r--r--ChangeLog5
-rw-r--r--Src/exec.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f56c99389..6da23d08e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-22  Peter Stephenson  <pws@csr.com>
+
+	* 25508: Src/exec.c: set file name if function came from
+	dump file.
+
 2008-08-21  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* Doc/Zsh/compsys.yo: doc for foregoing.
diff --git a/Src/exec.c b/Src/exec.c
index 08986afc3..4cd97b3df 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4406,8 +4406,11 @@ getfpfunc(char *s, int *ksh, char **fname)
 	    sprintf(buf, "%s/%s", *pp, s);
 	else
 	    strcpy(buf, s);
-	if ((r = try_dump_file(*pp, s, buf, ksh)))
+	if ((r = try_dump_file(*pp, s, buf, ksh))) {
+	    if (fname)
+		*fname = ztrdup(buf);
 	    return r;
+	}
 	unmetafy(buf, NULL);
 	if (!access(buf, R_OK) && (fd = open(buf, O_RDONLY | O_NOCTTY)) != -1) {
 	    if ((len = lseek(fd, 0, 2)) != -1) {