Commit db5a6916 authored by Max Kellermann's avatar Max Kellermann

PlaylistFile: remove obsolete function TranslatePlaylistError()

parent 48693250
......@@ -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.
*/
......
......@@ -49,9 +49,6 @@ spl_valid_name(const char *name_utf8);
AllocatedPath
spl_map_to_fs(const char *name_utf8, Error &error);
void
TranslatePlaylistError(Error &error);
/**
* Returns a list of stored_playlist_info struct pointers. Returns
* nullptr if an error occurred.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment