- Status Closed
- Percent Complete
- Task Type Bugs
- Category User Interface
- Assigned To No-one
- Operating System All players
- Severity Low
- Priority Very Low
- Reported Version Daily build (which?)
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#9357 - Cut/Paste does not remove old folder when replacing
I 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.
Closed by nls
2008-12-01 11:32
Reason for closing: Fixed
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
2008-12-01 11:32
Reason for closing: Fixed
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
Turns out safetydan's fix was
almost correct and worked with a small
change.
Committed as r19285,
thanks!
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Reproduced in a simulator, in fact no dirs that already exist in the destination will be
removed from the source, for example i tested with these two test dirs:
test1:
test2:
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:
edit: meh, the whitespace is apparently mangled in comments so dr2 is a subdir of dir1.
I’m guessing this is because the directory moving code just calls rename on the old directory and that fails. Though if that was the case then I’d expect that error to propagate up and show “Paste failed” or something. Either way, the paste code will probably need to explicitly remove the directory after it’s done recursing through it or something like that.
Hrm, actually, on closer inspection I think something like this might be needed:
At line 856 of apps/onplay.c add
and see if that fixes it. I’d test myself but I don’t have a build environment at the moment.
That fixes half the problem, the subdir is now removed but the dir that i select for copying, dir1 in the example above, is still not.
Then try adding this after line 916:
that should remove the clipboard selection on completion only if it worked.
Yes, that seems to be the right thing, but even with the moderate dir depth
I use for testing i bump in to the max open dirs limit :(
So, let’s mark this as depending on FS#9260.