Workaround for issue 1794: "Cannot save image or PP3 from Image Editor" ; properly catching exceptions on Windows should be preferred ; this patch is a clean fix for Linux and MacOS

This commit is contained in:
natureh 510
2013-04-10 01:12:42 +02:00
parent d8a9e4fc5b
commit de5026188d
4 changed files with 61 additions and 5 deletions

View File

@@ -255,6 +255,15 @@ void SaveAsDialog::setInitialFileName (Glib::ustring fname) {
void SaveAsDialog::setImagePath (Glib::ustring ipath) {
Glib::ustring path = Glib::path_get_dirname(ipath);
//Add the image's path to the Shortcut list
fchooser->add_shortcut_folder(Glib::path_get_dirname(ipath));
#ifdef WIN32
// Dirty workaround, waiting for a clean solution by using exceptions!
if (!safe_is_root_dir(path))
#endif
try {
fchooser->add_shortcut_folder(Glib::path_get_dirname(path));
}
catch (Gtk::FileChooserError &err) {}
}