aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-11-30 14:07:37 -0500
committerKen Moore <ken@ixsystems.com>2016-11-30 14:07:37 -0500
commit6953a388620a15cd2e4d5620b32da5492abff9b9 (patch)
tree06a732c41cbc626b210a09129ff1a2cc746f55e9 /src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
parentFix up the permissions of extracted files via lumina-archiver. (diff)
downloadlumina-6953a388620a15cd2e4d5620b32da5492abff9b9.tar.gz
lumina-6953a388620a15cd2e4d5620b32da5492abff9b9.tar.bz2
lumina-6953a388620a15cd2e4d5620b32da5492abff9b9.zip
Allow for multi-selection of items for extractions.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
index ddfd9d52..f87506ec 100644
--- a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
@@ -126,11 +126,17 @@ void Backend::startRemove(QStringList paths){
}
void Backend::startExtract(QString path, bool overwrite, QString file){
+ startExtract(path, overwrite, QStringList() << file); //overload for multi-file function
+}
+
+void Backend::startExtract(QString path, bool overwrite, QStringList files){
QStringList args;
args << "-x" << "--no-same-owner";
if(!overwrite){ args << "-k"; }
args << flags;
- if(!file.isEmpty()){ args << "--include" << file << "--strip-components" << QString::number(file.count("/")); }
+ for(int i=0; i<files.length(); i++){
+ args << "--include" << files[i] << "--strip-components" << QString::number(files[i].count("/"));
+ }
args << "-C" << path;
STARTING=true;
//qDebug() << "Starting command:" << "tar" << args;
bgstack15