Attachment names were not stripped of their path components on Windows.

This commit is contained in:
Moritz Bunkus 2003-09-19 14:26:04 +00:00
parent 7496acf43e
commit 47b4dec50d
3 changed files with 13 additions and 2 deletions

View File

@ -1,5 +1,10 @@
2003-09-19 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: bugfix: If attachments were given with path components
then the path component wasn't discarded for the attachment's
description on Windows (normally only the file name should be used
as the attachment's name).
* mmg: Fixed wrong order of the options --chapters,
--chapter-language and --chapter-charset.

View File

@ -891,9 +891,9 @@ static void render_attachments(IOCallback *out) {
attch->mime_type;
name = &attch->name[strlen(attch->name) - 1];
while ((name != attch->name) && (*name != '/'))
while ((name != attch->name) && (*name != PATHSEP))
name--;
if (*name == '/')
if (*name == PATHSEP)
name++;
if (*name == 0)
die("Internal error: *name == 0 on %d.", __LINE__);

View File

@ -44,4 +44,10 @@
#include <stdint.h>
#endif // !COMP_CYGWIN
#if defined(SYS_WINDOWS)
# define PATHSEP '\\'
#else
# define PATHSEP '/'
#endif
#endif