PlaylistFile: remove obsolete function TranslatePlaylistError()
This commit is contained in:
@@ -126,29 +126,6 @@ spl_map_to_fs(const char *name_utf8, Error &error)
|
||||
return path_fs;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
static bool
|
||||
IsNotFoundError(const Error &error)
|
||||
{
|
||||
#ifdef WIN32
|
||||
return error.IsDomain(win32_domain) &&
|
||||
error.GetCode() == ERROR_FILE_NOT_FOUND;
|
||||
#else
|
||||
return error.IsDomain(errno_domain) &&
|
||||
error.GetCode() == ENOENT;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
TranslatePlaylistError(Error &error)
|
||||
{
|
||||
if (IsNotFoundError(error)) {
|
||||
error.Clear();
|
||||
error.Set(playlist_domain, int(PlaylistResult::NO_SUCH_LIST),
|
||||
"No such playlist");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an #Error for the current errno.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user