diff options
| author | Juanma Barranquero | 2008-11-29 18:35:33 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-11-29 18:35:33 +0000 |
| commit | b23077df66f0b60e9ca9b0435f32326eadad9161 (patch) | |
| tree | aa6dbfdbf54069cccdef00d0227d8c6404a67093 | |
| parent | d182658510e5c8b91c49cb755aee4d94e5cb89f9 (diff) | |
| download | emacs-b23077df66f0b60e9ca9b0435f32326eadad9161.tar.gz emacs-b23077df66f0b60e9ca9b0435f32326eadad9161.zip | |
* w32proc.c: Include "coding.h".
(Fw32_short_file_name): Encode filename passed to Windows API.
(Fw32_long_file_name): Encode filename passed to Windows API and
decode back the result. (Bug#1433)
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/w32proc.c | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1cb44419d1f..143d8730bab 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2008-11-29 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * w32proc.c: Include "coding.h". | ||
| 4 | (Fw32_short_file_name): Encode filename passed to Windows API. | ||
| 5 | (Fw32_long_file_name): Encode filename passed to Windows API and | ||
| 6 | decode back the result. (Bug#1433) | ||
| 7 | |||
| 1 | 2008-11-29 Kenichi Handa <handa@m17n.org> | 8 | 2008-11-29 Kenichi Handa <handa@m17n.org> |
| 2 | 9 | ||
| 3 | * charset.h (CHAR_CHARSET_P): Check if the encoder is loaded or | 10 | * charset.h (CHAR_CHARSET_P): Check if the encoder is loaded or |
diff --git a/src/w32proc.c b/src/w32proc.c index ed405cce9ff..081749257f5 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -63,6 +63,7 @@ extern BOOL WINAPI IsValidLocale(LCID, DWORD); | |||
| 63 | #include "syssignal.h" | 63 | #include "syssignal.h" |
| 64 | #include "w32term.h" | 64 | #include "w32term.h" |
| 65 | #include "dispextern.h" /* for xstrcasecmp */ | 65 | #include "dispextern.h" /* for xstrcasecmp */ |
| 66 | #include "coding.h" | ||
| 66 | 67 | ||
| 67 | #define RVA_TO_PTR(var,section,filedata) \ | 68 | #define RVA_TO_PTR(var,section,filedata) \ |
| 68 | ((void *)((section)->PointerToRawData \ | 69 | ((void *)((section)->PointerToRawData \ |
| @@ -1781,7 +1782,7 @@ All path elements in FILENAME are converted to their short names. */) | |||
| 1781 | filename = Fexpand_file_name (filename, Qnil); | 1782 | filename = Fexpand_file_name (filename, Qnil); |
| 1782 | 1783 | ||
| 1783 | /* luckily, this returns the short version of each element in the path. */ | 1784 | /* luckily, this returns the short version of each element in the path. */ |
| 1784 | if (GetShortPathName (SDATA (filename), shortname, MAX_PATH) == 0) | 1785 | if (GetShortPathName (SDATA (ENCODE_FILE (filename)), shortname, MAX_PATH) == 0) |
| 1785 | return Qnil; | 1786 | return Qnil; |
| 1786 | 1787 | ||
| 1787 | CORRECT_DIR_SEPS (shortname); | 1788 | CORRECT_DIR_SEPS (shortname); |
| @@ -1810,7 +1811,7 @@ All path elements in FILENAME are converted to their long names. */) | |||
| 1810 | /* first expand it. */ | 1811 | /* first expand it. */ |
| 1811 | filename = Fexpand_file_name (filename, Qnil); | 1812 | filename = Fexpand_file_name (filename, Qnil); |
| 1812 | 1813 | ||
| 1813 | if (!w32_get_long_filename (SDATA (filename), longname, MAX_PATH)) | 1814 | if (!w32_get_long_filename (SDATA (ENCODE_FILE (filename)), longname, MAX_PATH)) |
| 1814 | return Qnil; | 1815 | return Qnil; |
| 1815 | 1816 | ||
| 1816 | CORRECT_DIR_SEPS (longname); | 1817 | CORRECT_DIR_SEPS (longname); |
| @@ -1821,7 +1822,7 @@ All path elements in FILENAME are converted to their long names. */) | |||
| 1821 | if (drive_only && longname[1] == ':' && longname[2] == '/' && !longname[3]) | 1822 | if (drive_only && longname[1] == ':' && longname[2] == '/' && !longname[3]) |
| 1822 | longname[2] = '\0'; | 1823 | longname[2] = '\0'; |
| 1823 | 1824 | ||
| 1824 | return build_string (longname); | 1825 | return DECODE_FILE (build_string (longname)); |
| 1825 | } | 1826 | } |
| 1826 | 1827 | ||
| 1827 | DEFUN ("w32-set-process-priority", Fw32_set_process_priority, | 1828 | DEFUN ("w32-set-process-priority", Fw32_set_process_priority, |