mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
Catch Glib::ConvertError when checking for files
This fixes some edge-cases when scanning recent sessions in get_state_files_in_directory() and likely some other places that use run_functor_for_paths in case the folder contains files with non UTF-8 names.
This commit is contained in:
parent
2c4d1e011c
commit
473f575a05
1 changed files with 6 additions and 3 deletions
|
|
@ -31,6 +31,7 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <glibmm/convert.h>
|
||||||
#include <glibmm/fileutils.h>
|
#include <glibmm/fileutils.h>
|
||||||
#include <glibmm/miscutils.h>
|
#include <glibmm/miscutils.h>
|
||||||
#include <glibmm/pattern.h>
|
#include <glibmm/pattern.h>
|
||||||
|
|
@ -130,9 +131,11 @@ run_functor_for_paths (vector<string>& result,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Glib::FileError const& err)
|
catch (Glib::FileError const& err) {
|
||||||
{
|
warning << string_compose (_("Cannot access file: %1"), err.what()) << endmsg;
|
||||||
warning << err.what() << endmsg;
|
}
|
||||||
|
catch (Glib::ConvertError const& err) {
|
||||||
|
warning << string_compose (_("Could not convert filename: %1"), err.what()) << endmsg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue