diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2012-11-18 13:08:41 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2012-11-18 13:08:41 +0000 |
| commit | b2103acf1da407e1bef705d9f6ee26cb896c43a2 (patch) | |
| tree | f96c887afcf74f2d5668f88fbd814be0519f1e6d /src/ui/dialog/export.cpp | |
| parent | Fix for 275662 : Filter stays in object's css property after Filter Effect di... (diff) | |
| download | inkscape-b2103acf1da407e1bef705d9f6ee26cb896c43a2.tar.gz inkscape-b2103acf1da407e1bef705d9f6ee26cb896c43a2.zip | |
UI. Fix for Bug #1071104 (Failure to open a browse window when choosing Export As...).
(bzr r11882)
Diffstat (limited to 'src/ui/dialog/export.cpp')
| -rw-r--r-- | src/ui/dialog/export.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index c073375a2..f267c5ae9 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -1260,6 +1260,14 @@ void Export::onBrowse () WCHAR* title_string = (WCHAR*)g_utf8_to_utf16(_("Select a filename for exporting"), -1, NULL, NULL, NULL); WCHAR* extension_string = (WCHAR*)g_utf8_to_utf16("*.png", -1, NULL, NULL, NULL); // Copy the selected file name, converting from UTF-8 to UTF-16 + std::string dirname = Glib::path_get_dirname(filename.raw()); + if ( !Glib::file_test(dirname, Glib::FILE_TEST_EXISTS) || + Glib::file_test(filename, Glib::FILE_TEST_IS_DIR) || + dirname.empty() ) + { + Glib::ustring tmp; + filename = create_filepath_from_id(tmp, tmp); + } WCHAR _filename[_MAX_PATH + 1]; memset(_filename, 0, sizeof(_filename)); gunichar2* utf16_path_string = g_utf8_to_utf16(filename.c_str(), -1, NULL, NULL, NULL); |
