forked from expo/troggle
format tidy & normalise paths in survex *inlcude
This commit is contained in:
@@ -294,7 +294,7 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
|
||||
cmd, line = mstar.groups()
|
||||
cmd = cmd.lower()
|
||||
if re.match("include$(?i)", cmd):
|
||||
includepath = os.path.join(os.path.split(survexfile.path)[0], re.sub(r"\.svx$", "", line))
|
||||
includepath = os.path.normpath(os.path.join(os.path.split(survexfile.path)[0], re.sub(r"\.svx$", "", line)))
|
||||
print((insp+' - Include path found including - ' + includepath))
|
||||
# Try to find the cave in the DB if not use the string as before
|
||||
path_match = re.search(r"caves-(\d\d\d\d)/(\d+|\d\d\d\d-?\w+-\d+)/", includepath)
|
||||
|
||||
Reference in New Issue
Block a user