Filtering out '~/'
parent
20b0632d0b
commit
421354e9c9
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue