Fix FS#9357 'Cut/Paste does not remove old folder when replacing', fix suggested by Dan Everton

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19285 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2008-12-01 11:31:22 +00:00
parent 9fc68a3ccc
commit d7fb430935

View file

@ -909,11 +909,17 @@ static bool clipboard_paste(void)
}
else
{
strncpy(srcpath, clipboard_selection, sizeof srcpath);
strncpy(targetpath, target, sizeof targetpath);
strncpy(srcpath, clipboard_selection, sizeof(srcpath));
strncpy(targetpath, target, sizeof(targetpath));
success = clipboard_pastedirectory(srcpath, sizeof(srcpath),
target, sizeof(targetpath), clipboard_is_copy);
if (success && !clipboard_is_copy)
{
strncpy(srcpath, clipboard_selection, sizeof(srcpath));
remove_dir(srcpath, sizeof(srcpath));
}
}
} else {
success = clipboard_pastefile(clipboard_selection, target,