diff options
Diffstat (limited to 'src/callproc.c')
-rw-r--r-- | src/callproc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/callproc.c b/src/callproc.c index cb72b070b7b..cd0f67fe29b 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -411,7 +411,11 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, /* If the buffer is (still) a list, it might be a (:file "file") spec. */ if (CONSP (buffer) && EQ (XCAR (buffer), QCfile)) { - output_file = Fexpand_file_name (XCAR (XCDR (buffer)), + Lisp_Object ofile = XCDR (buffer); + if (CONSP (ofile)) + ofile = XCAR (ofile); + CHECK_STRING (ofile); + output_file = Fexpand_file_name (ofile, BVAR (current_buffer, directory)); CHECK_STRING (output_file); buffer = Qnil; |