From 8c496ec89327c73ee6e2cb9a61476002b2150192 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 23 Sep 2015 14:18:49 -0400 Subject: Clean up the file transfer systems a bit in lumina-fm: 1) When copying/cutting files, also place a copy of the file list into the standard text/uri-list mimetype (with the local file URL syntax: file://) - This allows the files to be seen by other applications (if supported) 2) Also update the drag/drop functionality to use the standard text/uri-list format for all drag/drop operations. This allows movement of files between apps (such as moving a local file into a web-based file paste site). --- lumina-fm/FODialog.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lumina-fm/FODialog.cpp') 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; infiles.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; -- cgit