forked from mia/Aegisub
Don't try other providers after FileNotFound error
Otherwise this can cause confusing error messages from unrelated providers when simply opening an invalid path.
This commit is contained in:
parent
e4f0a9a510
commit
d96fc1f70d
1 changed files with 0 additions and 5 deletions
|
@ -72,11 +72,6 @@ std::unique_ptr<VideoProvider> VideoProviderFactory::GetProvider(agi::fs::path c
|
||||||
LOG_I("manager/video/provider") << factory->name << ": opened " << filename;
|
LOG_I("manager/video/provider") << factory->name << ": opened " << filename;
|
||||||
return provider->WantsCaching() ? CreateCacheVideoProvider(std::move(provider)) : std::move(provider);
|
return provider->WantsCaching() ? CreateCacheVideoProvider(std::move(provider)) : std::move(provider);
|
||||||
}
|
}
|
||||||
catch (agi::fs::FileNotFound const&) {
|
|
||||||
err = "file not found.";
|
|
||||||
// Keep trying other providers as this one may just not be able to
|
|
||||||
// open a valid path
|
|
||||||
}
|
|
||||||
catch (VideoNotSupported const&) {
|
catch (VideoNotSupported const&) {
|
||||||
found = true;
|
found = true;
|
||||||
err = "video is not in a supported format.";
|
err = "video is not in a supported format.";
|
||||||
|
|
Loading…
Reference in a new issue