about summary refs log tree commit diff
diff options
context:
space:
mode:
-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) {