diff --git a/lisp/files.el b/lisp/files.el index 8e8fbac8dc..7b6e186257 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -7439,7 +7439,11 @@ file-name-non-special ;; might be bound to different file name handlers, we still ;; need this. (saved-file-name-handler-alist file-name-handler-alist) - file-name-handler-alist + (inhibit-file-name-handlers + (cons 'file-name-non-special + (and (eq inhibit-file-name-operation operation) + inhibit-file-name-handlers))) + (inhibit-file-name-operation operation) ;; Some operations respect file name handlers in ;; `default-directory'. Because core function like ;; `call-process' don't care about file name handlers in diff --git a/src/callproc.c b/src/callproc.c index 5aa2cbafb4..e44e243680 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -276,6 +276,9 @@ DEFUN ("call-process", Fcall_process, Scall_process, 1, MANY, 0, else infile = build_string (NULL_DEVICE); + /* Remove "/:" from INFILE. */ + infile = remove_slash_colon (infile); + encoded_infile = ENCODE_FILE (infile); filefd = emacs_open (SSDATA (encoded_infile), O_RDONLY, 0); @@ -439,9 +442,15 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, current_dir = encode_current_directory (); if (STRINGP (error_file)) - error_file = ENCODE_FILE (error_file); + { + error_file = remove_slash_colon (error_file); + error_file = ENCODE_FILE (error_file); + } if (STRINGP (output_file)) - output_file = ENCODE_FILE (output_file); + { + output_file = remove_slash_colon (output_file); + output_file = ENCODE_FILE (output_file); + } display_p = INTERACTIVE && nargs >= 4 && !NILP (args[3]);