aboutsummaryrefslogtreecommitdiff
path: root/modules/paths_internal.py
diff options
context:
space:
mode:
authorcatboxanon <122327233+catboxanon@users.noreply.github.com>2024-02-15 14:22:13 -0500
committercatboxanon <122327233+catboxanon@users.noreply.github.com>2024-02-15 14:22:13 -0500
commit06ab10a1be812036605e1472f054228562ea08d9 (patch)
tree37ca6e6ac0617387389c8ff11be83152a58a947c /modules/paths_internal.py
parentb7f45e67dcf48914d2f34d4ace977a431a5aa12e (diff)
Normalize cmd arg paths
In particular, this fixes an issue on Windows where some functions will misbehave if forward slashes are provided rather than double backslashes.
Diffstat (limited to 'modules/paths_internal.py')
-rw-r--r--modules/paths_internal.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/paths_internal.py b/modules/paths_internal.py
index b86ecd7f..2ed1392a 100644
--- a/modules/paths_internal.py
+++ b/modules/paths_internal.py
@@ -4,6 +4,10 @@ import argparse
import os
import sys
import shlex
+from pathlib import Path
+
+
+normalized_filepath = lambda filepath: str(Path(filepath).resolve())
commandline_args = os.environ.get('COMMANDLINE_ARGS', "")
sys.argv += shlex.split(commandline_args)