summaryrefslogtreecommitdiffstats
path: root/src/resource-manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resource-manager.cpp')
-rw-r--r--src/resource-manager.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/resource-manager.cpp b/src/resource-manager.cpp
index fe53eca4f..dbff27827 100644
--- a/src/resource-manager.cpp
+++ b/src/resource-manager.cpp
@@ -222,11 +222,15 @@ std::map<Glib::ustring, Glib::ustring> ResourceManagerImpl::locateLinks(Glib::us
Glib::ustring uri = (*it)->get_uri();
std::string scheme = Glib::uri_parse_scheme(uri);
if ( scheme == "file" ) {
- std::string path = Glib::filename_from_uri(uri);
- path = Glib::path_get_dirname(path);
- if ( std::find(priorLocations.begin(), priorLocations.end(), path) == priorLocations.end() ) {
- // TODO debug g_message(" ==>[%s]", path.c_str());
- priorLocations.push_back(path);
+ try {
+ std::string path = Glib::filename_from_uri(uri);
+ path = Glib::path_get_dirname(path);
+ if ( std::find(priorLocations.begin(), priorLocations.end(), path) == priorLocations.end() ) {
+ // TODO debug g_message(" ==>[%s]", path.c_str());
+ priorLocations.push_back(path);
+ }
+ } catch (Glib::ConvertError e) {
+ g_warning("Bad URL ignored [%s]", uri.c_str());
}
}
}