-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add new setting for storing user data inside app folder for windows #7513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Add new setting for storing user data inside app folder for windows #7513
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This setting is available in all Windows builds, not just the zip and 7zip ones, which is highly problematic for the following reasons:
- It is not uncommon for people using installers to place the install in an admin protected folder such as Program Files, so if someone tried to turn on this setting which such an install it wouldn't work, thankfully it would just error with permission errors but not lose any data.
- The installer overwrites everything in the install folder when it runs, as it doesn't keep track of which files were installed by the previous installer run and makes the decent assumption that nobody would place anything else in that folder. Previously that wasn't a big deal as only a few users made the mistake of selecting the user data folder as the install location, so we could just tell them to not do that. However by adding this setting and allowing people to use it with the installer builds, we are adding support for people to lose their data when updating FreeTube and it will be our fault when the data is deleted and no it being in the experimental settings with a "use at your own risk" message is not enough, the setting has to hidden and inactive in installer builds.
I rarely do a blocking review on a pull request but this really should not be merged until that major issue is fixed, we should not be making losing your data when updating FreeTube thanks to a FreeTube setting a supported use case.
|
Ya also this doesn't work with portable version |
|
Updated for portable version and NSIS installer version, custom build updated |
|
Not sure patching the installer is the right approach. I think if we add this, it should only be available in the portable version/zip files, as it doesn't make much sense to show and allow it with the installer version, as the installer is inherently not portable and the entire point of this is to make FreeTube more portable. |
|
Updated installer version (by detecting the existence of uninstaller executable) to have new setting hidden and disabled (even with flag file created) |
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
ebd6083 to
e666087
Compare
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
|
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
* development: (325 commits) Replace vue-portal dependency with Vue's built-in <Teleport> component (FreeTubeApp#8207) Update to Vue 3 (FreeTubeApp#8094) Translated using Weblate (Basque) Translated using Weblate (Hungarian) Translated using Weblate (Icelandic) Translated using Weblate (Turkish) Properly fix CORS in PO token web views (FreeTubeApp#8203) Translated using Weblate (Italian) Translated using Weblate (Norwegian Bokmål) Translated using Weblate (French) Configure nedb to always clean up corrupted data (FreeTubeApp#8202) Translated using Weblate (Portuguese (Brazil)) Add video paused check to frame shortcuts (FreeTubeApp#8200) Fix toast with timeout 0 will be displayed for default 3s (FreeTubeApp#8168) Translated using Weblate (Chinese (Simplified Han script)) Change containing text input limit (FreeTubeApp#8174) Translated using Weblate (Dutch) Add support for AppImageUpdate (FreeTubeApp#8153) Added New Window option to Tray (FreeTubeApp#7995) Translated using Weblate (Japanese) ...
Pull Request Type
Related issue
#746
Description
It's common for a portable app to store user data (settings and other data files)
https://portableapps.com/about/what_is_a_portable_app#definition
Screenshots
Testing
** Backup data before testing **
Suggest to test with non dev version to be accurate (I have never tested this with dev on windows)
Custom build: https://github.com/PikachuEXE/FreeTube/actions/runs/15481269896
A1. Windows - 7z/zip version
Replace HTTP Cache(for later special setting sync test)userDataunder the app folder (if you want to test auto folder creation you can do that later)e.g. if executable is at
C:\FreeTube\Freetube.exe, createC:\FreeTube\userDataexperiment-replace-http-cacheinside that folder (which should be absent whenReplace HTTP Cachedisabled)Replace HTTP Cachestill OFF (and empty fileexperiment-replace-http-cacheis gone)*.db) now present in newuserDatafolder in app folderReplace HTTP Cacheexperiment-replace-http-cachepresent in default user data folderReplace HTTP Cachestill ONuserDatafolder (%APPDATA%\FreeTube, see https://www.electronjs.org/docs/latest/api/app#appgetpathname)A2. Windows - portable version (single executable)
Similar to A1 but
userDatafolder and new flag file are both in the same folder as the portable executable fileA3. Windows - NSIS installer version
B. Non windows (macOS/Linux)
Desktop
Additional context