mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Merge branch 'saveas_to_parent_folder_mac' of https://github.com/delftswa2014/Arduino into delftswa2014-saveas_to_parent_folder_mac
This commit is contained in:
commit
803a0eebb4
@ -647,7 +647,14 @@ public class Sketch {
|
||||
fd.setDirectory(Base.getSketchbookFolder().getAbsolutePath());
|
||||
} else {
|
||||
// default to the parent folder of where this was
|
||||
fd.setDirectory(data.getFolder().getParentFile().getAbsolutePath());
|
||||
// on macs a .getParentFile() method is required
|
||||
|
||||
if (OSUtils.isMacOS()) {
|
||||
fd.setSelectedFile(data.getFolder().getParentFile());
|
||||
} else {
|
||||
fd.setSelectedFile(data.getFolder());
|
||||
}
|
||||
|
||||
}
|
||||
String oldName = data.getName();
|
||||
fd.setFile(oldName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user