From 8fb6c693ef8df6af09b174185efb764dcee37662 Mon Sep 17 00:00:00 2001 From: Audrey Aaliyah Jensen Date: Fri, 8 Sep 2023 09:45:48 -0500 Subject: [PATCH] error correct trailing slash for input path --- Sandbox Scripts/extract.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sandbox Scripts/extract.py b/Sandbox Scripts/extract.py index e905189..94601b2 100644 --- a/Sandbox Scripts/extract.py +++ b/Sandbox Scripts/extract.py @@ -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