error correct trailing slash for input path

This commit is contained in:
Audrey Aaliyah Jensen 2023-09-08 09:45:48 -05:00
parent 087566a737
commit 8fb6c693ef

View File

@ -18,6 +18,7 @@ import re
EXTENSION = "eml"
OUTREGEX = ".*\\\\"
INREGEX = ".*\\\\$"
def extract(filename):
print(filename)
@ -59,6 +60,10 @@ if __name__ == "__main__":
path = ""
if len(sys.argv) > 1:
path = sys.argv[1]
#Make sure there's a trailing slash
pathRE = re.search(INREGEX, path)
if pathRE is None:
path += "\\\\"
else:
path = "./"
# let's do this in parallel, using cpu count as number of threads