mathberet icon indicating copy to clipboard operation
mathberet copied to clipboard

File save feature saves to an incompatible path on macOS

Open zivattias opened this issue 2 years ago • 2 comments

Description: After clicking 'Save' for a particular file, it saves in a Windows-like configured path, even though I run on macOS.

Reproduction: Simply open a New Folder in the app, and a New File within. After saving it, you'll discover New File is saved outside of New Folder, with the name "files\New Folder\New File.json". Its path: "/Users/<user>/Documents/Mathberet/files\New Folder\New File.json"

Expected behavior: File path should have its backslashes reverted.

Screenshots: mathberet_bug

  • OS: macOS

zivattias avatar Apr 17 '23 16:04 zivattias

@zivattias The functions in the app that deal with paths currently handles only windows paths (\\ or \). Some of the functions also have TODO comments suggesting to make the path formatting cross-platform. Addressing this will probably also fix #9.

zivnadel avatar Apr 17 '23 18:04 zivnadel

Proposed a fix here: PR #33

zivattias avatar Apr 17 '23 19:04 zivattias