diff --git a/src/DSUtil/FileHandle.cpp b/src/DSUtil/FileHandle.cpp index ede91a775d..cf266d48e5 100644 --- a/src/DSUtil/FileHandle.cpp +++ b/src/DSUtil/FileHandle.cpp @@ -33,6 +33,7 @@ // PathFileExistsW // PathFindExtensionW // PathIsDirectoryW +// PathIsRootW // PathRemoveBackslashW // PathRemoveFileSpecW // PathStripPathW diff --git a/src/apps/mplayerc/PlayerPlaylistBar.cpp b/src/apps/mplayerc/PlayerPlaylistBar.cpp index 9d38497784..8b9290f35d 100644 --- a/src/apps/mplayerc/PlayerPlaylistBar.cpp +++ b/src/apps/mplayerc/PlayerPlaylistBar.cpp @@ -312,11 +312,11 @@ static bool FindFileInList(std::list& sl, const CString& fn) return false; } -static void StringToPaths(const CString& curentdir, const CString& str, std::vector& paths) +static void StringToPaths(const CStringW& curentdir, const CStringW& str, std::vector& paths) { int pos = 0; do { - CString s = str.Tokenize(L";", pos); + CStringW s = str.Tokenize(L";", pos); if (s.GetLength() == 0) { continue; } @@ -326,10 +326,9 @@ static void StringToPaths(const CString& curentdir, const CString& str, std::vec continue; // the asterisk can only be in the last folder } - CPath path(curentdir); - path.Append(s); + CStringW path = GetCombineFilePath(curentdir, s); - if (path.IsRoot() && path.FileExists()) { + if (::PathIsRootW(path) && ::PathFileExistsW(path)) { paths.emplace_back(path); continue; }