-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Data directory recreated in legacy .local/share/data location after being deleted if FileLogger\Path
setting still references a path inside it
#13519
Comments
Complete bullshit! (sorry) |
Perhaps I worded it wrong. What I meant was that the setting should be migrated or reset in some way so as to prevent the recreation of files in the legacy directory. I agree that migrating/changing/resetting settings is not a pleasant problem to have to deal with. Or perhaps some other creative solution is required - as long as it prevents the recreation of files in the legacy directory. |
When we have an explicitly set setting, there is no exact way to determine that the user doesn't actually want it. We can only assume (taking into account the changes made) that if some path from the settings points inside the legacy directory, and the specified object does not exist, but there is a similar object in the new directory, then the user wanted to use the new one. But I wouldn't want to add this logic to the code. The changes were not intended to add any automatic migration, etc. |
If this is the case then there is no problem. Perhaps I was being misled as I don't have enough time to examine the code. |
The thing is, the whole directory structure (GeoDB, BT_backup, etc, folders) is re-created, not just |
Are you sure you use build with #11644 applied? |
@lbilli, can you confirm or deny this? |
In case
Possible workarounds:
|
I think it should work. BT_backup is hardcoded name so there are no corresponding settings that can confuse the logic. |
Another option could be to check first if the new layout already exists, i.e.:
|
The log directory should not cause the entire data directory to be recreated, it should only create the log directory. If the recommended directory is found, qbittorrent should just use it regardless of whether another setting wants to create a particular file in the legacy directory. |
You also might want to reflect this change on |
Please provide the following information
qBittorrent version and Operating System
If on linux, libtorrent-rasterbar and Qt version
What is the problem
After moving the data directory to the new recommended location, it got recreated in the old location on next startup and the warning about using the legacy location showed up again. Changing the path of the
FileLogger\Path
setting in the config file to the new path fixed the problem.What is the expected behavior
The files shouldn't be recreated in the legacy location after migrating the files, regardless of the logger file path setting.
Steps to reproduce
FileLogger\Path=/home/user/.local/share/data/qBittorrent/logs
Extra info(if any)
Manually changing
FileLogger\Path=/home/user/.local/share/data/qBittorrent/logs
toFileLogger\Path=/home/user/.local/share/qBittorrent/logs
fixes the issue, as one would probably expect. Upon the following start up, no files are recreated in the legacy location, the warning doesn't show, and the new location is used.The text was updated successfully, but these errors were encountered: