error correct trailing slash for input path
This commit is contained in:
parent
087566a737
commit
8fb6c693ef
@ -18,6 +18,7 @@ import re
|
|||||||
|
|
||||||
EXTENSION = "eml"
|
EXTENSION = "eml"
|
||||||
OUTREGEX = ".*\\\\"
|
OUTREGEX = ".*\\\\"
|
||||||
|
INREGEX = ".*\\\\$"
|
||||||
|
|
||||||
def extract(filename):
|
def extract(filename):
|
||||||
print(filename)
|
print(filename)
|
||||||
@ -59,6 +60,10 @@ if __name__ == "__main__":
|
|||||||
path = ""
|
path = ""
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
path = 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:
|
else:
|
||||||
path = "./"
|
path = "./"
|
||||||
# let's do this in parallel, using cpu count as number of threads
|
# let's do this in parallel, using cpu count as number of threads
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user