[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111711: Fix bug #13661 with w32-down
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111711: Fix bug #13661 with w32-downcase-file-names and shell-command. |
Date: |
Sat, 09 Feb 2013 18:36:53 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111711
fixes bug: http://debbugs.gnu.org/13661
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2013-02-09 18:36:53 +0200
message:
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.
modified:
src/ChangeLog
src/callproc.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-02-09 12:52:01 +0000
+++ b/src/ChangeLog 2013-02-09 16:36:53 +0000
@@ -1,5 +1,9 @@
2013-02-09 Eli Zaretskii <address@hidden>
+ * 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. (Bug#13661)
+
* xdisp.c (decode_mode_spec): Remove handling of %t.
* msdos.c (careadlinkatcwd): Remove.
=== modified file 'src/callproc.c'
--- a/src/callproc.c 2013-02-02 17:14:24 +0000
+++ b/src/callproc.c 2013-02-09 16:36:53 +0000
@@ -1016,8 +1016,26 @@
{
USE_SAFE_ALLOCA;
Lisp_Object pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir);
- Lisp_Object encoded_tem = ENCODE_FILE (pattern);
- char *tempfile = SAFE_ALLOCA (SBYTES (encoded_tem) + 1);
+ Lisp_Object encoded_tem;
+ char *tempfile;
+
+#ifdef WINDOWSNT
+ /* Cannot use the result of Fexpand_file_name, because it
+ downcases the XXXXXX part of the pattern, and mktemp then
+ doesn't recognize it. */
+ if (!NILP (Vw32_downcase_file_names))
+ {
+ Lisp_Object dirname = Ffile_name_directory (pattern);
+
+ if (NILP (dirname))
+ pattern = Vtemp_file_name_pattern;
+ else
+ pattern = concat2 (dirname, Vtemp_file_name_pattern);
+ }
+#endif
+
+ encoded_tem = ENCODE_FILE (pattern);
+ tempfile = SAFE_ALLOCA (SBYTES (encoded_tem) + 1);
memcpy (tempfile, SDATA (encoded_tem), SBYTES (encoded_tem) + 1);
coding_systems = Qt;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111711: Fix bug #13661 with w32-downcase-file-names and shell-command.,
Eli Zaretskii <=