[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r116960: Fix open-dribble-file's treatment of non
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-24 r116960: Fix open-dribble-file's treatment of non-ASCII file names. |
Date: |
Sun, 13 Apr 2014 10:46:26 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116960
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Sun 2014-04-13 13:45:46 +0300
message:
Fix open-dribble-file's treatment of non-ASCII file names.
src/keyboard.c (Fopen_dribble_file): Encode the dribble file-name
before passing it to system APIs.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/keyboard.c keyboard.c-20091113204419-o5vbwnq5f7feedwu-449
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-04-13 07:33:15 +0000
+++ b/src/ChangeLog 2014-04-13 10:45:46 +0000
@@ -1,5 +1,8 @@
2014-04-13 Eli Zaretskii <address@hidden>
+ * keyboard.c (Fopen_dribble_file): Encode the dribble file-name
+ before passing it to system APIs.
+
* puresize.h (BASE_PURESIZE): Bump by 1K. (Bug#17255)
2014-04-13 Stefan Monnier <address@hidden>
=== modified file 'src/keyboard.c'
--- a/src/keyboard.c 2014-04-12 21:54:27 +0000
+++ b/src/keyboard.c 2014-04-13 10:45:46 +0000
@@ -10087,10 +10087,13 @@
if (!NILP (file))
{
int fd;
+ Lisp_Object encfile;
+
file = Fexpand_file_name (file, Qnil);
- fd = emacs_open (SSDATA (file), O_WRONLY | O_CREAT | O_EXCL, 0600);
- if (fd < 0 && errno == EEXIST && unlink (SSDATA (file)) == 0)
- fd = emacs_open (SSDATA (file), O_WRONLY | O_CREAT | O_EXCL, 0600);
+ encfile = ENCODE_FILE (file);
+ fd = emacs_open (SSDATA (encfile), O_WRONLY | O_CREAT | O_EXCL, 0600);
+ if (fd < 0 && errno == EEXIST && unlink (SSDATA (encfile)) == 0)
+ fd = emacs_open (SSDATA (encfile), O_WRONLY | O_CREAT | O_EXCL, 0600);
dribble = fd < 0 ? 0 : fdopen (fd, "w");
if (dribble == 0)
report_file_error ("Opening dribble", file);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r116960: Fix open-dribble-file's treatment of non-ASCII file names.,
Eli Zaretskii <=