This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#9357 - Cut/Paste does not remove old folder when replacing
Attached to Project:
Rockbox
Opened by Shiloh Hawley (gree665) - Tuesday, 02 September 2008, 23:40 GMT+1
Last edited by Nils Wallménius (nls) - Monday, 01 December 2008, 12:32 GMT+1
Opened by Shiloh Hawley (gree665) - Tuesday, 02 September 2008, 23:40 GMT+1
Last edited by Nils Wallménius (nls) - Monday, 01 December 2008, 12:32 GMT+1
|
DetailsI move a folder named 'foo' from my 'newmusic' folder to my 'music' folder using cut and paste in Rockbox. There is already a folder called 'foo' in 'music', so RB asks me if I want to overwrite it and I say yes. Then all of the files in 'foo' are moved as expected, but the empty 'foo' folder still remains in 'newmusic'.
I hope that makes sense, if not, or if you have any problems reproducing, let me know. |
This task depends upon
Closed by Nils Wallménius (nls)
Monday, 01 December 2008, 12:32 GMT+1
Reason for closing: Fixed
Additional comments about closing: Turns out safetydan's fix was almost correct and worked with a small change.
Committed as r19285, thanks!
Monday, 01 December 2008, 12:32 GMT+1
Reason for closing: Fixed
Additional comments about closing: Turns out safetydan's fix was almost correct and worked with a small change.
Committed as r19285, thanks!
removed from the source, for example i tested with these two test dirs:
test1:
dir1
dir2
file
test2:
dir1
dir2
file
if i cut and paste test1 into test2's parent i get asked if i want to overwrite and if
i answer "yes" i end up with a test1 dir that looks as follows:
test1:
dir1
dir2
edit: meh, the whitespace is apparently mangled in comments so dr2 is a subdir of dir1.
At line 856 of apps/onplay.c add
if (!copy) {
remove_dir(src, srclen);
}
and see if that fixes it. I'd test myself but I don't have a build environment at the moment.
if (success && !clipboard_is_copy) {
remove_dir(clipboard_selection, strlen(clipboard_selection));
}
that should remove the clipboard selection on completion only if it worked.
I use for testing i bump in to the max open dirs limit :(
So, let's mark this as depending on FS#9260.