aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-12-01 08:23:27 -0500
committerKen Moore <ken@ixsystems.com>2016-12-01 08:23:27 -0500
commitf9dd55960d1fa93882287b7949042273bda74183 (patch)
treeabd89bcfe5eda0e491d3880f32d60cfa2bf44eba
parentAllow for multi-selection of items for extractions. (diff)
downloadlumina-f9dd55960d1fa93882287b7949042273bda74183.tar.gz
lumina-f9dd55960d1fa93882287b7949042273bda74183.tar.bz2
lumina-f9dd55960d1fa93882287b7949042273bda74183.zip
Have lumina-archiver just open the containing folder when extracting multiple files.
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
index f87506ec..9a8cd5b7 100644
--- a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
@@ -214,12 +214,13 @@ void Backend::procFinished(int retcode, QProcess::ExitStatus){
QStringList args = PROC.arguments();
if(args.contains("-x") && retcode==0){
needupdate=false;
- if(args.contains("--include")){
- //Need to find the full path to the extracted file
+ if(args.count("--include")==1){
+ //Need to find the full path to the (single) extracted file
QString path = args.last() +"/"+ args[ args.indexOf("--include")+1].section("/",-1);
QFile::setPermissions(path, QFileDevice::ReadOwner);
QProcess::startDetached("xdg-open \""+path+"\"");
}else{
+ //Multi-file extract - open the dir instead
QProcess::startDetached("xdg-open \""+ args.last()+"\""); //just extracted to a dir - open it now
}
}else if(args.contains("-c") && QFile::exists(tmpfilepath)){
bgstack15