Martchus / syncthingtray

Tray application and Dolphin/Plasma integration for Syncthing
https://martchus.github.io/syncthingtray/
Other
1.5k stars 42 forks source link

Running tests overwrites .config/autostart entry #221

Closed itsxaos closed 6 months ago

itsxaos commented 6 months ago

Relevant components

Environment and versions

Bug description

Running the tests (i.e. when updating the AUR package) overwrites the autostart entry command to something like "/home/xaos/.cache/yay/syncthingtray/src/syncthingtray-1.4.10/syncthingwidgets/syncthingwidgets_wizard_tests" qt-widgets-gui --single-instance. This then means Syncthing Tray does not autostart on subsequent reboots / logins.

I've had a quick look at syncthingwidgets/tests/wizard.cpp and some of the syncthingwidgets/settings files but I haven't been able to figure out why this is happening.

Steps to reproduce

  1. Setup Syncthing Tray autostart
  2. Check ~/.config/autostart/syncthingtray.desktop
    ...
    Exec="/usr/bin/syncthingtray" qt-widgets-gui --single-instance`
    ...
  3. Update Syncthing Tray / run the tests (yay -Su syncthingtray)
  4. Check ~/.config/autostart/syncthingtray.desktop
    ...
    Exec="/home/xaos/.cache/yay/syncthingtray/src/syncthingtray-1.4.11/syncthingwidgets/syncthingwidgets_wizard_tests" qt-widgets-gui --single-instance
    ...

Expected behavior Tests probably should not change config / autostart files, or if they have to, try to restore them to how they were.

Additional context I think this has been happening for quite a while, it just took me some time to figure out why the autostart kept breaking.

P.S.: Thanks for your work on Syncthing Tray, I like it a lot!

Martchus commented 6 months ago

That should definitely not be the case and it's likely an oversight on my side. Thanks for reporting, I'll have a look at this tomorrow.

Martchus commented 6 months ago

Should be fixed on master. I also updated the AUR packages.

itsxaos commented 6 months ago

Awesome, thank you! I reinstalled just now and the fix for the AUR package works.