From 394aa3097fe504edce814454315d4dd533b4c5e6 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 26 Mar 2015 10:29:02 -0400 Subject: Actually move the file/dir copy onto itself check earlier in the procedure, that way we can't run into the situation where the dir is removed because of the conflicting destination. --- lumina-fm/FODialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lumina-fm/FODialog.cpp') diff --git a/lumina-fm/FODialog.cpp b/lumina-fm/FODialog.cpp index 416404ee..d182ed06 100644 --- a/lumina-fm/FODialog.cpp +++ b/lumina-fm/FODialog.cpp @@ -269,6 +269,10 @@ void FOWorker::slotStartOperations(){ if(isRM){ //only old files olist << subfiles(ofiles[i], false); //dirs need to be last for removals }else if(isCP || isRESTORE){ + if(nfiles[i] == ofiles[i]){ + //Trying to copy a file/dir to itself - skip it + continue; + } if(QFile::exists(nfiles[i])){ if(!overwrite){ nfiles[i] = newFileName(nfiles[i]); //prompt for new file name up front before anything starts -- cgit