diff options
author | Sasongko Bawono <sasongko262@gmail.com> | 2017-02-26 08:33:25 +0700 |
---|---|---|
committer | Sasongko Bawono <sasongko262@gmail.com> | 2017-02-26 08:33:25 +0700 |
commit | eb7d5a1270d17ecd16912008d8587cc543cafc77 (patch) | |
tree | 64be065a2e3fe58933bb5be6f30cc76a1af33f86 /src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp | |
parent | modified DEPENDENCIES for Slackware (diff) | |
parent | Merge remote-tracking branch 'origin/master' (diff) | |
download | lumina-eb7d5a1270d17ecd16912008d8587cc543cafc77.tar.gz lumina-eb7d5a1270d17ecd16912008d8587cc543cafc77.tar.bz2 lumina-eb7d5a1270d17ecd16912008d8587cc543cafc77.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp index 78efd51c..0659f8b1 100644 --- a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp +++ b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp @@ -27,6 +27,7 @@ Backend::~Backend(){ // PUBLIC //=============== void Backend::loadFile(QString path){ + //qDebug() << "Loading Archive:" << path; filepath = path; tmpfilepath = filepath.section("/",0,-2)+"/"+".tmp_larchiver_"+filepath.section("/",-1); flags.clear(); @@ -149,7 +150,7 @@ void Backend::startViewFile(QString path){ args << "-x"; args << flags <<"--include" << path <<"--strip-components" << QString::number(path.count("/")) << "-C" << QDir::tempPath(); STARTING=true; - qDebug() << "Starting command:" << "tar" << args; + //qDebug() << "Starting command:" << "tar" << args; PROC.start("tar", args); } @@ -195,6 +196,7 @@ void Backend::startList(){ QStringList args; args << "-tv"; LIST = STARTING=true; + //qDebug() << "Starting List:" << "tar "+args.join(" ")+" "+flags.join(" "); PROC.start("tar", QStringList() << args << flags); } @@ -203,12 +205,17 @@ void Backend::startList(){ //=============== void Backend::procFinished(int retcode, QProcess::ExitStatus){ static QString result; - processData(); //qDebug() << "Process Finished:" << PROC.arguments() << retcode; + processData(); LIST = STARTING = false; if(PROC.arguments().contains("-tv")){ - if(retcode!=0){ contents.clear(); } //could not read archive - emit ProcessFinished(true,result); + if(retcode!=0){ //could not read archive + contents.clear(); + result = tr("Could not read archive"); + }else if(result.isEmpty()){ + result = tr("Archive Loaded"); + } + emit ProcessFinished((retcode==0), result); result.clear(); }else{ bool needupdate = true; |