playlist/Mapper: postpone the stored playlist error
Fixes another regression by commit
f53cd44c7a
- an exception thrown by
playlist_open_in_playlist_dir() would skip over
playlist_open_in_storage().
This commit is contained in:
parent
c8be9662bb
commit
9f174c56ce
@ -56,10 +56,18 @@ playlist_mapper_open(const char *uri,
|
|||||||
#endif
|
#endif
|
||||||
Mutex &mutex)
|
Mutex &mutex)
|
||||||
{
|
{
|
||||||
|
std::exception_ptr spl_error;
|
||||||
|
|
||||||
if (spl_valid_name(uri)) {
|
if (spl_valid_name(uri)) {
|
||||||
auto playlist = playlist_open_in_playlist_dir(uri, mutex);
|
try {
|
||||||
if (playlist != nullptr)
|
auto playlist = playlist_open_in_playlist_dir(uri, mutex);
|
||||||
return playlist;
|
if (playlist != nullptr)
|
||||||
|
return playlist;
|
||||||
|
} catch (...) {
|
||||||
|
/* postpone this exception, try playlist in
|
||||||
|
music_directory first */
|
||||||
|
spl_error = std::current_exception();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_DATABASE
|
#ifdef ENABLE_DATABASE
|
||||||
@ -70,5 +78,8 @@ playlist_mapper_open(const char *uri,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (spl_error)
|
||||||
|
std::rethrow_exception(spl_error);
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user