super-productivity icon indicating copy to clipboard operation
super-productivity copied to clipboard

Backup path is broken on linux, plus automatic backup flag seems to be ignored

Open Mblakey opened this issue 1 year ago • 12 comments

Installed on linux through snap --edge channel

Last slash before backup causes the folder to be saved in the home directory, is there no way to set the path in settings?

Also with automatic backups off, these backups are still being created?

image

Mblakey avatar Dec 10 '23 10:12 Mblakey

Thank you very much for opening up this issue! I am currently a bit overwhelmed by the many requests that arrive each week, so please forgive me, if I fail to respond personally. I am still very likely to at least skim read your request and I'll probably try to fix all (real) bugs if possible and I will likely review every single PR being made (please, give me a heads up if you intent to do so) and I will try to work on popular requests (please upvote via thumbs up on the original issue) whenever possible, but trying to respond to every single issue over the last years has been kind of draining and I need to adjust my approach for this project to remain fun for me and to make any progress with actually coding new stuff. Thanks for your understanding!

github-actions[bot] avatar Dec 10 '23 10:12 github-actions[bot]

Hello there Mblakey! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀

For more open ended discussions and/or specific questions, please visit the discussions page. 💖

github-actions[bot] avatar Dec 10 '23 10:12 github-actions[bot]

issue #2869 has not seemed to have been fixed

Mblakey avatar Dec 10 '23 11:12 Mblakey

Can reproduce this, backup directory is now in $HOME on arch linux via AUR

kushagra-xo avatar Dec 10 '23 17:12 kushagra-xo

Confirmed as well. Good catch @kushagra-xo. Since installing 7.16.0 backups stopped appearing in ~/path/to/superProductivity/backups and instead end up in a directory called \backups in $HOME.

Setup: linux fedora 38 superproductivity v7.16.0 installed via packaged rpm

jodyhoonstarr avatar Dec 10 '23 19:12 jodyhoonstarr

I confirmed too. Same issue with AppImage. All backups are create in "$HOME/\backup". Changing path or disabling configuration are totally ignored.

Setup: openSUSE Leap 15.5 superproductivity v7.16.0 installed via AppImage

k-nard avatar Dec 12 '23 08:12 k-nard

Not a Javascript developer but why not use https://nodejs.org/api/path.html#pathjoinpaths instead of trying to implement by oneself?

q-wertz avatar Dec 12 '23 10:12 q-wertz

@q-wertz Agreed, would rather just have the option to set my own path rather then trying to make a universal option for all machines

Mblakey avatar Dec 14 '23 08:12 Mblakey

It seams as if this recent commit broke the linux backup path.

I think the issue it is that the + operator has higher precedence that the == operator.

From electron/backup.ts:

let BACKUP_DIR =
  `${app.getPath('userData')}` + process.platform == 'linux' ||
  process.platform === 'darwin'
    ? `/`
    : `\\` + `backups`;

So it compares /home/<user>/.config/superProductivity + process.platform against linux and that then fails.

Emily3403 avatar Dec 20 '23 17:12 Emily3403

@Emily3403 great find! Not a js/ts developer here so was wondering if you also had any ideas why the automatic backup flag is being ignored? Regardless of the path being right or not

Mblakey avatar Dec 21 '23 18:12 Mblakey

I am using the latest version 7.17.0. The backup path is now shown correctly in the application settings, but the backup still is created in \backups in the home directory, even when automatic backups are disabled.

dahaupt avatar Dec 29 '23 11:12 dahaupt

After the latest update 7.17.1, the issue seams fixed. I deleted the \backups directory and it did not get created again. Superproductivity also reports the correct backup path:

Saving backups to /home/emily/.config/superProductivity/backups

Emily3403 avatar Dec 29 '23 22:12 Emily3403

This issue has not received any updates in 90 days. Please comment, if this still relevant!

github-actions[bot] avatar Apr 28 '24 01:04 github-actions[bot]