Skip to content

Commit

Permalink
Используем функцию PathIsRootW вместо метода CPath::IsRoot.
Browse files Browse the repository at this point in the history
  • Loading branch information
v0lt committed Sep 12, 2024
1 parent 46c46ce commit 2b1a962
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/DSUtil/FileHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
// PathFileExistsW
// PathFindExtensionW
// PathIsDirectoryW
// PathIsRootW
// PathRemoveBackslashW
// PathRemoveFileSpecW
// PathStripPathW
Expand Down
9 changes: 4 additions & 5 deletions src/apps/mplayerc/PlayerPlaylistBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@ static bool FindFileInList(std::list<T>& sl, const CString& fn)
return false;
}

static void StringToPaths(const CString& curentdir, const CString& str, std::vector<CString>& paths)
static void StringToPaths(const CStringW& curentdir, const CStringW& str, std::vector<CStringW>& paths)
{
int pos = 0;
do {
CString s = str.Tokenize(L";", pos);
CStringW s = str.Tokenize(L";", pos);
if (s.GetLength() == 0) {
continue;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 2b1a962

Please sign in to comment.