Commit 3bc0ec07 authored by Rémi Duraffort's avatar Rémi Duraffort

mkv: use DIR_SEP_CHAR when applicable.

parent 58acae69
...@@ -145,15 +145,15 @@ static int Open( vlc_object_t * p_this ) ...@@ -145,15 +145,15 @@ static int Open( vlc_object_t * p_this )
// assume it's a regular file // assume it's a regular file
// get the directory path // get the directory path
s_path = p_demux->psz_path; s_path = p_demux->psz_path;
if (s_path.at(s_path.length() - 1) == DIRECTORY_SEPARATOR) if (s_path.at(s_path.length() - 1) == DIR_SEP_CHAR)
{ {
s_path = s_path.substr(0,s_path.length()-1); s_path = s_path.substr(0,s_path.length()-1);
} }
else else
{ {
if (s_path.find_last_of(DIRECTORY_SEPARATOR) > 0) if (s_path.find_last_of(DIR_SEP_CHAR) > 0)
{ {
s_path = s_path.substr(0,s_path.find_last_of(DIRECTORY_SEPARATOR)); s_path = s_path.substr(0,s_path.find_last_of(DIR_SEP_CHAR));
} }
} }
...@@ -166,7 +166,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -166,7 +166,7 @@ static int Open( vlc_object_t * p_this )
{ {
if (strlen(psz_file) > 4) if (strlen(psz_file) > 4)
{ {
s_filename = s_path + DIRECTORY_SEPARATOR + psz_file; s_filename = s_path + DIR_SEP_CHAR + psz_file;
#ifdef WIN32 #ifdef WIN32
if (!strcasecmp(s_filename.c_str(), p_demux->psz_path)) if (!strcasecmp(s_filename.c_str(), p_demux->psz_path))
......
...@@ -119,16 +119,6 @@ extern "C" { ...@@ -119,16 +119,6 @@ extern "C" {
#define MKVD_TIMECODESCALE 1000000 #define MKVD_TIMECODESCALE 1000000
/**
* What's between a directory and a filename?
*/
#if defined( WIN32 )
#define DIRECTORY_SEPARATOR '\\'
#else
#define DIRECTORY_SEPARATOR '/'
#endif
#define MKV_IS_ID( el, C ) ( EbmlId( (*el) ) == C::ClassInfos.GlobalId ) #define MKV_IS_ID( el, C ) ( EbmlId( (*el) ) == C::ClassInfos.GlobalId )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment