portable-file-dialogs icon indicating copy to clipboard operation
portable-file-dialogs copied to clipboard

[macOS] Fix save dialog when absolute path is included

Open JVital2013 opened this issue 2 years ago • 0 comments

It appears that issue #65 has not been completely fixed - while the dialog displays now, it exhibits the problem talked about by @EvanBalster when providing a complete absolute path: "default name causes the path to be interpreted as a filename rather than a location."

This PR fixes the issue by setting both default name and default location in AppleScript if both are provided in the default path to pfd::save_file(). Otherwise, it falls back to the previous logic.

Before Fix Screen Shot 2023-09-27 at 3 27 48 PM

After Fix Screen Shot 2023-09-27 at 3 32 52 PM

JVital2013 avatar Sep 27 '23 19:09 JVital2013