fix bug with left strip

This commit is contained in:
Q
2024-07-30 17:16:05 +03:00
parent 626c7f50c0
commit 0478d38a83

View File

@@ -408,8 +408,7 @@ KeyLength: {key.get('length')}"""
if self.opts.command == "decrypt": if self.opts.command == "decrypt":
auto_path = in_file[: -len(self.suffix)] auto_path = in_file[: -len(self.suffix)]
if self.opts.recursive and self.opts.out_path: if self.opts.recursive and self.opts.out_path:
out_file = os.path.join(self.opts.out_path, strip_prefix(auto_path, self.opts.path)) out_file = os.path.join(self.opts.out_path, strip_prefix(auto_path, self.opts.path).lstrip("/"))
print(out_file)
os.makedirs(os.path.dirname(out_file), exist_ok=True) os.makedirs(os.path.dirname(out_file), exist_ok=True)
else: else:
out_file = self.opts.out_path if self.opts.out_path else auto_path out_file = self.opts.out_path if self.opts.out_path else auto_path