diff options
author | Weblate <noreply@weblate.org> | 2018-01-02 22:00:13 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2018-01-02 22:00:13 +0000 |
commit | 76f036e835d89572b92006c7f6d4918b7c799664 (patch) | |
tree | a80a82bda02e0fc740ea607767ad2409c8aeaa8d /src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp | |
parent | Translated using Weblate (Portuguese (Brazil)) (diff) | |
parent | Merge branch 'master' of github.com:trueos/lumina (diff) | |
download | lumina-76f036e835d89572b92006c7f6d4918b7c799664.tar.gz lumina-76f036e835d89572b92006c7f6d4918b7c799664.tar.bz2 lumina-76f036e835d89572b92006c7f6d4918b7c799664.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp index 5338efec..91e233d0 100644 --- a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp +++ b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp @@ -91,7 +91,7 @@ QString Backend::linkTo(QString file){ } //Modification routines -void Backend::startAdd(QStringList paths){ +void Backend::startAdd(QStringList paths, bool absolutePaths){ //if(paths.isEmpty() && !insertQueue.isEmpty()){ paths = insertQueue; } //load the queue if(paths.contains(filepath)){ paths.removeAll(filepath); } if(paths.isEmpty()){ return; } @@ -109,11 +109,12 @@ void Backend::startAdd(QStringList paths){ args << "-c" << "-a"; args << flags; //Now setup the parent dir - for(int i=0; i<paths.length(); i++){ - paths[i] = paths[i].section(parent,1,-1); - if(paths[i].startsWith("/")){ paths[i].remove(0,1); } - } - args << "-C" << parent; + if(!absolutePaths) { + for(int i=0; i<paths.length(); i++){ + paths[i] = paths[i].section(parent,1,-1); + if(paths[i].startsWith("/")){ paths[i].remove(0,1); } + } + args << "-C" << parent; } args << paths; if(QFile::exists(filepath)){ //append to existing args.replaceInStrings(filepath, tmpfilepath); |