diff options
Diffstat (limited to 'src/app-window.vala')
-rw-r--r-- | src/app-window.vala | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/app-window.vala b/src/app-window.vala index 6f2d353..446353d 100644 --- a/src/app-window.vala +++ b/src/app-window.vala @@ -550,8 +550,7 @@ public class AppWindow : Gtk.ApplicationWindow if (file_type_combo.get_active_iter (out i)) file_type_store.get (i, 1, out extension, -1); - var path = save_dialog.get_filename (); - var filename = Path.get_basename (path); + var filename = save_dialog.get_current_name (); /* Replace extension */ var extension_index = filename.last_index_of_char ('.'); @@ -578,14 +577,11 @@ public class AppWindow : Gtk.ApplicationWindow if (file_type_combo.get_active_iter (out i)) file_type_store.get (i, 1, out extension, -1); - var path = save_dialog.get_filename (); - var filename = Path.get_basename (path); + var uri = save_dialog.get_uri (); - var extension_index = filename.last_index_of_char ('.'); + var extension_index = uri.last_index_of_char ('.'); if (extension_index < 0) - path += extension; - - var uri = File.new_for_path (path).get_uri (); + uri += extension; /* Check the file(s) don't already exist */ var files = new List<File> (); |