diff options
| author | Eli Zaretskii | 2013-02-09 18:36:53 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-02-09 18:36:53 +0200 |
| commit | 74ba15836233e028331e2195ed78a16afdc09c17 (patch) | |
| tree | f3a89bef00cb3d21a50a359d546bb67198c4d9fa /src/callproc.c | |
| parent | 2d0504232eab9deb2b09d47d39ceb76a369dc922 (diff) | |
| download | emacs-74ba15836233e028331e2195ed78a16afdc09c17.tar.gz emacs-74ba15836233e028331e2195ed78a16afdc09c17.zip | |
Fix bug #13661 with w32-downcase-file-names and shell-command.
src/callproc.c (Fcall_process_region): Make sure the XXXXXX part of
the temporary file pattern is not downcased even when
w32-downcase-file-names is non-nil.
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/callproc.c b/src/callproc.c index ea79da7ff5a..cb11ee0cc53 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1016,8 +1016,26 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r | |||
| 1016 | { | 1016 | { |
| 1017 | USE_SAFE_ALLOCA; | 1017 | USE_SAFE_ALLOCA; |
| 1018 | Lisp_Object pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir); | 1018 | Lisp_Object pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir); |
| 1019 | Lisp_Object encoded_tem = ENCODE_FILE (pattern); | 1019 | Lisp_Object encoded_tem; |
| 1020 | char *tempfile = SAFE_ALLOCA (SBYTES (encoded_tem) + 1); | 1020 | char *tempfile; |
| 1021 | |||
| 1022 | #ifdef WINDOWSNT | ||
| 1023 | /* Cannot use the result of Fexpand_file_name, because it | ||
| 1024 | downcases the XXXXXX part of the pattern, and mktemp then | ||
| 1025 | doesn't recognize it. */ | ||
| 1026 | if (!NILP (Vw32_downcase_file_names)) | ||
| 1027 | { | ||
| 1028 | Lisp_Object dirname = Ffile_name_directory (pattern); | ||
| 1029 | |||
| 1030 | if (NILP (dirname)) | ||
| 1031 | pattern = Vtemp_file_name_pattern; | ||
| 1032 | else | ||
| 1033 | pattern = concat2 (dirname, Vtemp_file_name_pattern); | ||
| 1034 | } | ||
| 1035 | #endif | ||
| 1036 | |||
| 1037 | encoded_tem = ENCODE_FILE (pattern); | ||
| 1038 | tempfile = SAFE_ALLOCA (SBYTES (encoded_tem) + 1); | ||
| 1021 | memcpy (tempfile, SDATA (encoded_tem), SBYTES (encoded_tem) + 1); | 1039 | memcpy (tempfile, SDATA (encoded_tem), SBYTES (encoded_tem) + 1); |
| 1022 | coding_systems = Qt; | 1040 | coding_systems = Qt; |
| 1023 | 1041 | ||