From 2b1a962910b0ccf46cd45214a3447f9a05fd6f53 Mon Sep 17 00:00:00 2001 From: v0lt Date: Thu, 12 Sep 2024 06:07:02 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7?= =?UTF-8?q?=D1=83=D0=B5=D0=BC=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8E?= =?UTF-8?q?=20PathIsRootW=20=D0=B2=D0=BC=D0=B5=D1=81=D1=82=D0=BE=20=D0=BC?= =?UTF-8?q?=D0=B5=D1=82=D0=BE=D0=B4=D0=B0=20CPath::IsRoot.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DSUtil/FileHandle.cpp | 1 + src/apps/mplayerc/PlayerPlaylistBar.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) 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; }