diff options
author | Ken Moore <ken@pcbsd.org> | 2015-03-26 10:29:02 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-03-26 10:29:02 -0400 |
commit | 394aa3097fe504edce814454315d4dd533b4c5e6 (patch) | |
tree | 501b851f854d956d3ee87930b65bdb03631c8cf8 /lumina-fm/FODialog.cpp | |
parent | Clean up a couple things in lumina-fm: (diff) | |
download | lumina-394aa3097fe504edce814454315d4dd533b4c5e6.tar.gz lumina-394aa3097fe504edce814454315d4dd533b4c5e6.tar.bz2 lumina-394aa3097fe504edce814454315d4dd533b4c5e6.zip |
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.
Diffstat (limited to 'lumina-fm/FODialog.cpp')
-rw-r--r-- | lumina-fm/FODialog.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 |