Browse Source

scripts: waifulib: don't use relative path while creating ZIP file (so cwd might not be equal to sources path)

master
Alibek Omarov 9 months ago
parent
commit
25ea6ed500
  1. 2
      scripts/waifulib/zip.py

2
scripts/waifulib/zip.py

@ -16,7 +16,7 @@ class ziparchive(Task.Task):
return 'Creating' return 'Creating'
def run(self): def run(self):
outfile = self.outputs[0].path_from(self.outputs[0].ctx.launch_node()) outfile = self.outputs[0].abspath()
comp = zipfile.ZIP_STORED if self.compresslevel == 0 else zipfile.ZIP_DEFLATED comp = zipfile.ZIP_STORED if self.compresslevel == 0 else zipfile.ZIP_DEFLATED
with zipfile.ZipFile(outfile, mode='w', compression=comp) as zf: with zipfile.ZipFile(outfile, mode='w', compression=comp) as zf:

Loading…
Cancel
Save