finicky icon indicating copy to clipboard operation
finicky copied to clipboard

Config not reloaded when changed to symlink

Open kondratyev-nv opened this issue 3 years ago • 1 comments

Thanks for the tool!

Describe the bug After I completed the configuration in ~/.finicky.js and was sure that everything works as expected I tried to move this config to my dotfiles repo and created a symlink with the same path - ~/.finicky.js -> ~/.dotiles/.finicky.js. At that point, config loading broke image

To Reproduce Steps to reproduce the behavior:

  1. Modify configuration in ~/.finicky.js
  2. mv ~/.finicky.js ~/some-directory
  3. ln -Fs ~/some-directory/.finicky.js ~/.finicky.js
  4. Reload config - should show the error as above.

At first, I thought that symlinks are not working at all. However, looking through the code it seems that Finicky resolves symlinks once - when loading for the first time and nothing is saved in settings - https://github.com/johnste/finicky/blob/f8b7a2f1bedd731c6742d6b5a5d62655c1b04265/Finicky/Finicky/AppDelegate.swift#L82-L86 So if I go through Use another file... and select symlink - it works. But I would expect to save the original path (~/.finicky.js) in settings and resolve symlinks every time config reloads.

kondratyev-nv avatar Mar 11 '21 18:03 kondratyev-nv

Thanks for the thorough report!

johnste avatar Mar 12 '21 19:03 johnste