videoduplicatefinder icon indicating copy to clipboard operation
videoduplicatefinder copied to clipboard

[Bug]: Crashes on save settings if program dir is read-only [linux/NixOS] -> should use standards compliant config/state dirs

Open ppenguin opened this issue 1 year ago • 0 comments

Environment

  • OS: Linux (NixOS)

Describe the bug

I just made a nix package (still testing), and noticed that apparently VDF tries to save settings under the program's lib dir:

 ---> System.IO.IOException: Read-only file system : '/nix/store/9ghl5xa4s7l0q4w5yd22zvkp0rdxvqr7-videoduplicatefinder-3.0.0/lib/videoduplicatefinder/Settings.json'

This leads to a core dump.

It would be better if the default location for the config were the respective platform default:

  • caches/state:
    • Linux: ~/.local/share/VDF/ or $XDG_DATA_HOME/VDF
    • Windows: %APPDATA%\VDF\
    • MacOS: ~/Library/Application Support/VDF/
  • config:
    • Linux: ~/.config/VDF
    • Windows %APPDATA%\VDF\config (?)
    • MacOS: ~/Library/Preferences/VDF/

ppenguin avatar Mar 21 '25 22:03 ppenguin