drop extracted files into the email file's dir
This commit is contained in:
parent
8fb6c693ef
commit
c0981619bb
@ -27,7 +27,8 @@ def extract(filename):
|
||||
"""
|
||||
# ensure that an output dir exists
|
||||
filepath = re.findall(OUTREGEX, filename)
|
||||
od = (filepath[0] or "") + "/output"
|
||||
od = (filepath[0] or "") + "/"
|
||||
|
||||
os.path.exists(od) or os.makedirs(od)
|
||||
output_count = 0
|
||||
try:
|
||||
@ -60,6 +61,7 @@ if __name__ == "__main__":
|
||||
path = ""
|
||||
if len(sys.argv) > 1:
|
||||
path = sys.argv[1]
|
||||
print("Path: " + path)
|
||||
#Make sure there's a trailing slash
|
||||
pathRE = re.search(INREGEX, path)
|
||||
if pathRE is None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user