Relative paths can cause problems when exporting

Platform: Mac
Install: Steam
Version: Aseprite 1.3.9.2

When an image is opened from a non-user location - one that the user does not have execute/write permissions for - when trying to export and using the file-picker to select a user-owned path, Aseprite prepends the full original path plus the relative path to the export location, which results in the inability to export due to lack of permissions.

To reproduce:

  • On a Mac take a screenshot with CMD+SHIFT+4
  • When the preview icon of the screenshot hovers in the corner, drag it into Aseprite
  • Make some edits then attempt to export it.

The path will be in a system-owned temporary directory like /var/zxq45-big-random-numbers-5uyfjk3/Temporary/Screenshots/qwe123.png and when an absolute path to an export directory is selected, or typed in to the dialogue box, for example /Users/jay/Desktop/export.png then Aseprite will try to use the full original path, plus a relative path from that location, which would look like /var/zxq45-etc-etc-etc/../../<more>/../../Users/jay/Desktop/export.png

Expected behaviour:

When either selecting a directory from the file picker, or typing in a path that starts with / to the text field, Aseprite should use the absolute path that was selected.

Workaround:

When this happens it’s quite difficult to save your work because the path issue persists. It may be necessary to copy and paste the work into a new document (that doesn’t have a hidden-remembered source path) then save that document.