-
Notifications
You must be signed in to change notification settings - Fork 50
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
[BUG] Contents of directories are not merged if one with such name exists #45
Comments
@nvllz 👏 Thanks for the report. My concern: If we merge the folders, what should we do if both the folders contain a file that has the same name? An example: Many users use Amarok to hide visual novel game data. If a user starts the launcher by accident when data is still in the hidden state, the launcher is expected to produce lots of configs or log files. These files have the same name as the hidden ones. And merging them could lead to game data corruption which is hard to fix. If we just leave the merge task to the user, the user can simply delete the newly generated folder. And my solution to your problem: set all the inner nested folders (like |
The only solution I can think of is to first check for any files before processing if there is already a catalog with the same name, and if there are any files there, let the user decide whether to merge or skip processing for that catalog. If it's too complex, If it's too complex, I can stick to what you said below, but the hiding of the folder name is one thing that I would like to achieve here. |
That's where the problem is. The hiding process is performed in a background thread (so it can be triggered by the QuickSettings switch or the PanicButton). Popping out a dialog from background service is generally discouraged by Android and has lots of limitations. Instead, I can try sending a notification to notify the user about the failure & provide a button to auto-merge the folders — no guarantee, I'll have a try later. |
Describe the bug
Amarok doesn't rename catalogs to their original names if catalogs with those names already exist. Didn't try if the same thing happens when hiding.
To reproduce
The easiest way to reproduce such a result is to deal with a nested Screenshots catalog.
Screenshots
catalog with Amarok, in my case it's underDCIM/Screenshots
, so I hide the whole contents ofDCIM
. All the catalogs and folders will be renamed to respective hidden namesDCIM/Screenshots
catalog with our screenshot will automatically appear next to our original hidden catalogDCIM
directory in your file manager. You will see bothScreenshots
and the hidden catalog in Amarok. Our files have been unhidden, but they are still in a catalog with a hidden nameExpected behavior
I believe that Amarok encounters an error when trying to rename a catalog, but there is already one with the exact same name. The expected behavior is for Amarok to merge the two directories. It should check if such a catalog exists before trying to rename it, and if it does, move the processed files to the desired directory and delete the empty one.
The text was updated successfully, but these errors were encountered: