diff --git a/persoconf/main.py b/persoconf/main.py index ab3e8c5..7220479 100755 --- a/persoconf/main.py +++ b/persoconf/main.py @@ -412,10 +412,12 @@ if args.command == "package": pkg = tarfile.open(pkgname, "w:gz") for f in appmeta.files: - # TODO remove leading '~' + filename = args.rootdir +"/"+ appmeta.name +"/"+ f + filedest = appmeta.files[f]["dest"].replace("~/", "", 1) + # TODO save and restore owners and permissions try: - pkg.add(args.rootdir +"/"+ appmeta.name +"/"+ f, arcname=appmeta.files[f]["dest"]) + pkg.add(filename, arcname=filedest) log.info("Adding %s to package" % f) except: log.warning("Failed to add %s to tar package %s" % (f, pkgname))