debug step
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
__version__ = "20240627.1"
|
__version__ = "20240730.0"
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
@@ -285,6 +285,9 @@ class Processor:
|
|||||||
if os.path.isfile(root):
|
if os.path.isfile(root):
|
||||||
return [root]
|
return [root]
|
||||||
raise ValueError("path is not a file, and no --recursive")
|
raise ValueError("path is not a file, and no --recursive")
|
||||||
|
if recurse:
|
||||||
|
if os.path.isfile(root):
|
||||||
|
raise ValueError("path is a file, and --recursive used")
|
||||||
filelist = []
|
filelist = []
|
||||||
for path, dirs, files in os.walk(root):
|
for path, dirs, files in os.walk(root):
|
||||||
dirs.sort()
|
dirs.sort()
|
||||||
@@ -326,13 +329,13 @@ class Processor:
|
|||||||
print(f"Generated {self.opts.key} and {self.opts.key}.pub", file=sys.stderr)
|
print(f"Generated {self.opts.key} and {self.opts.key}.pub", file=sys.stderr)
|
||||||
|
|
||||||
def process_single(self, in_file):
|
def process_single(self, in_file):
|
||||||
|
|
||||||
if self.opts.command == "encrypt":
|
if self.opts.command == "encrypt":
|
||||||
auto_path = in_file + self.suffix
|
auto_path = in_file + self.suffix
|
||||||
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))
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user