Fix expansion and encoding of sound file names on MS-Windows.
commita6cc335aef90cb4a2dc3fde77cbea9886240301e
authorEli Zaretskii <eliz@gnu.org>
Sat, 13 Sep 2014 08:26:44 +0000 (13 11:26 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 13 Sep 2014 08:26:44 +0000 (13 11:26 +0300)
tree2f01a0d438766d70cfbd50880950f6b2a4b0acf0
parente868e853a85fb4466ab045962a269db31760f354
Fix expansion and encoding of sound file names on MS-Windows.

 src/sound.c (Fplay_sound_internal): Encode the sound file name in
 the ANSI codepage.  Expand it against data-directory, as per docs,
 not against the current directory.  No need to make a local copy
 of the file name; pass the encoded file name directly to
 do_play_sound.  (Bug#18463)
 src/w32.c (ansi_encode_filename): If w32_get_short_filename returns
 NULL, and the file name is not encodable in ANSI codepage, return
 the string with "?" replacement characters, which will fail the
 caller.  This avoids returning a random value in that case.
src/ChangeLog
src/sound.c
src/w32.c