Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/playlist/Playlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ auto Playlist::AddPath(const std::string& path, uint32_t index, bool recursive,

if (recursive)
{
try
for (const auto& entry : recursive_directory_iterator(path))
{
for (const auto& entry : recursive_directory_iterator(path))
try
{
if (is_regular_file(entry) && entry.path().extension() == ".milk")
{
Expand All @@ -106,17 +106,17 @@ auto Playlist::AddPath(const std::string& path, uint32_t index, bool recursive,
{
currentIndex = index + presetsAdded;
}
if (AddItem(entry.path().string(), currentIndex, allowDuplicates))
if (AddItem(entry.path().u8string(), currentIndex, allowDuplicates))
{
presetsAdded++;
}
}
}
}
catch (std::exception&)
{
// Todo: Add failure feedback
return presetsAdded;
catch (std::exception&)
{
// Todo: Add failure feedback
continue;
}
}
}
else
Expand All @@ -130,7 +130,7 @@ auto Playlist::AddPath(const std::string& path, uint32_t index, bool recursive,
{
currentIndex = index + presetsAdded;
}
if (AddItem(entry.path().string(), currentIndex, allowDuplicates))
if (AddItem(entry.path().u8string(), currentIndex, allowDuplicates))
{
presetsAdded++;
}
Expand Down Expand Up @@ -222,8 +222,8 @@ void Playlist::Sort(uint32_t startIndex, uint32_t count,
break;

case SortPredicate::FilenameOnly: {
leftFilename = path(left.Filename()).filename().string();
rightFilename = path(right.Filename()).filename().string();
leftFilename = path(left.Filename()).filename().u8string();
rightFilename = path(right.Filename()).filename().u8string();
break;
}
}
Expand Down