summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/file.c b/file.c
index 9382d89edb..4ef8d3258c 100644
--- a/file.c
+++ b/file.c
@@ -1158,7 +1158,8 @@ file_s_expand_path(argc, argv)
}
else if (s[0] != '/') {
if (argc == 2) {
- strcpy(buf, STR2CSTR(dname));
+ dname = file_s_expand_path(1, &dname);
+ strcpy(buf, RSTRING(dname)->ptr);
}
else {
#ifdef HAVE_GETCWD