about summary refs log tree commit diff
path: root/Src
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 /Src
parentc0e501d8a53c1bc29f48c1e7cd94d6eb9601bb54 (diff)
downloadzsh-9fe735e663507164a61341c998247328fa2a738b.tar.gz
zsh-9fe735e663507164a61341c998247328fa2a738b.tar.xz
zsh-9fe735e663507164a61341c998247328fa2a738b.zip
25508: set file name if function came from dump file
Diffstat (limited to 'Src')
-rw-r--r--Src/exec.c5
1 files changed, 4 insertions, 1 deletions
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) {