asciidocfx / AsciidocFX

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)
http://www.asciidocfx.com/
Apache License 2.0
1.88k stars 295 forks source link

Ensure that the DirectoryService's Chooser uses a valid directory path #517

Closed Ayowel closed 3 years ago

Ayowel commented 3 years ago

Issue

Fix #514

If the working directory saved by AsciidocFX is not a path to a valid directory or subdirectory, changing the working directory becomes impossible from the GUI (clicking the button to set the working directory fails to open a prompt).

Fix

With this PR, the first valid parent directory found is used to browse and if none exists we use the first drive found.

Test

All tests were performed on windows, all commands executed in cmd

Test path bubble-up

Test Drive failover

rahmanusta commented 3 years ago

Hi @Ayowel, thanks for the implementation