aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/FODialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-fm/FODialog.cpp')
-rw-r--r--lumina-fm/FODialog.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lumina-fm/FODialog.cpp b/lumina-fm/FODialog.cpp
index 4f4ca838..5d20e3be 100644
--- a/lumina-fm/FODialog.cpp
+++ b/lumina-fm/FODialog.cpp
@@ -108,6 +108,16 @@ bool FODialog::MoveFiles(QStringList oldPaths, QStringList newPaths){
bool FODialog::CheckOverwrite(){
bool ok = true;
+ //Quick check that a file is not supposed to be moved/copied/restored onto itself
+ if(!Worker->isRM){
+ for(int i=0; i<Worker->nfiles.length(); i++){
+ if(Worker->nfiles[i] == Worker->ofiles[i]){
+ //duplicate - remove it from the queue
+ Worker->nfiles.removeAt(i); Worker->ofiles.removeAt(i);
+ i--;
+ }
+ }
+ }
if(!Worker->isRM && Worker->overwrite==-1){
//Check if the new files already exist, and prompt for action
QStringList existing;
bgstack15