From 94ae313802ba84164214efd28afe75278d8cf483 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 14 Nov 2017 15:00:00 -0500 Subject: Fix up the insertion of files from multiple directories within the tar backend. --- src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp') diff --git a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp index f110624b..5338efec 100644 --- a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp +++ b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp @@ -10,6 +10,7 @@ #include #include #include +#include Backend::Backend(QObject *parent) : QObject(parent){ //Setup the backend process @@ -91,14 +92,23 @@ QString Backend::linkTo(QString file){ //Modification routines void Backend::startAdd(QStringList paths){ - //NOTE: All the "paths" have to have the same parent directory + //if(paths.isEmpty() && !insertQueue.isEmpty()){ paths = insertQueue; } //load the queue if(paths.contains(filepath)){ paths.removeAll(filepath); } if(paths.isEmpty()){ return; } + //NOTE: All the "paths" have to have the same parent directory + //Go through and find all the files that contain the same parent dir, and put the rest into the insertQueue + QString parent = paths[0].section("/",0,-2); + insertQueue.clear(); + for(int i=1; i