From d96fc1f70da9e0b01b394ebf25083949a0da759c Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Wed, 8 Feb 2023 17:37:44 +0100 Subject: [PATCH] Don't try other providers after FileNotFound error Otherwise this can cause confusing error messages from unrelated providers when simply opening an invalid path. --- src/video_provider_manager.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/video_provider_manager.cpp b/src/video_provider_manager.cpp index 3739a7293..254df155a 100644 --- a/src/video_provider_manager.cpp +++ b/src/video_provider_manager.cpp @@ -72,11 +72,6 @@ std::unique_ptr VideoProviderFactory::GetProvider(agi::fs::path c LOG_I("manager/video/provider") << factory->name << ": opened " << filename; 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&) { found = true; err = "video is not in a supported format.";