From f9dd55960d1fa93882287b7949042273bda74183 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 1 Dec 2016 08:23:27 -0500 Subject: Have lumina-archiver just open the containing folder when extracting multiple files. --- src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 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 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)){ -- cgit