fs/AllocatedPath: add method FromUTF8Throw()

This commit is contained in:
Max Kellermann
2016-04-12 21:20:32 +02:00
parent 6513ff92a7
commit fc3e0dfcd1
5 changed files with 22 additions and 10 deletions

View File

@@ -96,9 +96,7 @@ embcue_playlist_open_uri(const char *uri,
/* only local files supported */
return nullptr;
const auto path_fs = AllocatedPath::FromUTF8(uri);
if (path_fs.IsNull())
return nullptr;
const auto path_fs = AllocatedPath::FromUTF8Throw(uri);
const auto playlist = new EmbeddedCuePlaylist();

View File

@@ -94,9 +94,7 @@ flac_playlist_open_uri(const char *uri,
/* only local files supported */
return nullptr;
const auto path_fs = AllocatedPath::FromUTF8(uri);
if (path_fs.IsNull())
return nullptr;
const auto path_fs = AllocatedPath::FromUTF8Throw(uri);
const NarrowPath narrow_path_fs(path_fs);