mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Merge pull request #15374 from atom/ku-save-as-default-dir
Don't assign default path for `showSaveDialog` unless it exists
This commit is contained in:
@@ -742,7 +742,8 @@ class Pane
|
||||
return unless item?.saveAs?
|
||||
|
||||
saveOptions = item.getSaveDialogOptions?() ? {}
|
||||
saveOptions.defaultPath ?= item.getPath()
|
||||
itemPath = item.getPath()
|
||||
saveOptions.defaultPath ?= itemPath if itemPath
|
||||
newItemPath = @applicationDelegate.showSaveDialog(saveOptions)
|
||||
if newItemPath
|
||||
promisify -> item.saveAs(newItemPath)
|
||||
|
||||
Reference in New Issue
Block a user