diff options
author | catboxanon <122327233+catboxanon@users.noreply.github.com> | 2024-02-15 19:22:13 +0000 |
---|---|---|
committer | catboxanon <122327233+catboxanon@users.noreply.github.com> | 2024-02-15 19:22:13 +0000 |
commit | 06ab10a1be812036605e1472f054228562ea08d9 (patch) | |
tree | 37ca6e6ac0617387389c8ff11be83152a58a947c /modules/paths_internal.py | |
parent | b7f45e67dcf48914d2f34d4ace977a431a5aa12e (diff) | |
download | stable-diffusion-webui-gfx803-06ab10a1be812036605e1472f054228562ea08d9.tar.gz stable-diffusion-webui-gfx803-06ab10a1be812036605e1472f054228562ea08d9.tar.bz2 stable-diffusion-webui-gfx803-06ab10a1be812036605e1472f054228562ea08d9.zip |
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.py | 4 |
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)
|