aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/FODialog.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-09-23 14:18:49 -0400
committerKen Moore <moorekou@gmail.com>2015-09-23 14:18:49 -0400
commit8c496ec89327c73ee6e2cb9a61476002b2150192 (patch)
tree10aaaf44e5a0b2b7c3613acd97945cf7b9021c19 /lumina-fm/FODialog.cpp
parentMerge branch 'master' of github.com:pcbsd/lumina (diff)
downloadlumina-8c496ec89327c73ee6e2cb9a61476002b2150192.tar.gz
lumina-8c496ec89327c73ee6e2cb9a61476002b2150192.tar.bz2
lumina-8c496ec89327c73ee6e2cb9a61476002b2150192.zip
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).
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