Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Exclude "/PBI-*.desktop" files from the classic package, and optimize…

… the permissions check within a package by only reading the "*/Desktop" file within the package.
  • Loading branch information...
commit 47cbe52bb93871658235dbcaeb0deb7f7e4a4d77 1 parent 7a4b57b
Ken Moore beanpole135 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src-qt4/life-preserver/lp-gui/LPGUtils.cpp
4 src-qt4/life-preserver/lp-gui/LPGUtils.cpp
View
@@ -205,7 +205,7 @@ QString LPGUtils::packageHomeDir(QString username, QString packageName){
QString cmd = "tar -czf /usr/home/"+packageName+" -C /usr/home "+username;
//Create the exclude list and skip these files
QStringList excludes;
- excludes << "*flashplayer*"; //Don't overwrite the flash plugin
+ excludes << "*flashplayer*" << "*/PBI-*.desktop"; //Don't include the flash plugin/PBI entries
for(int i=0; i<excludes.length(); i++){
cmd.replace("-czf /usr/home", " --exclude \'"+excludes[i]+"\' -czf /usr/home");
}
@@ -225,7 +225,7 @@ bool LPGUtils::checkPackageUserPath(QString packagePath, QString *user){
//Determine if the file exists
if( !QFile::exists(packagePath) ){ return false; }
//Check the username of the home dir in the package
- QStringList ret = LPBackend::getCmdOutput("tar -tvf "+packagePath);
+ QStringList ret = LPBackend::getCmdOutput("tar -tvf "+packagePath+" -q \"*/Desktop\"");
if(ret.isEmpty()){ return false; }
QString username = ret[0].section(" ",2,2,QString::SectionSkipEmpty).simplified();
QString dirname = ret[0].section(" ",8,8,QString::SectionSkipEmpty).section("/",0,0).simplified();
Please sign in to comment.
Something went wrong with that request. Please try again.