diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-11-05 19:30:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-05 19:30:57 +0300 |
commit | ff805d8d0eb8e3de42f04747de0d1c7354491810 (patch) | |
tree | c6e557895ff3172bad42da469a6912ac718078a1 /modules/ui_gradio_extensions.py | |
parent | 44c5097375ae4cf40300c09473bb46cf6c5d6cb7 (diff) | |
parent | c3699d4fd185d5a7285c5519f9bb4b6fec236d9f (diff) |
Merge branch 'dev' into master
Diffstat (limited to 'modules/ui_gradio_extensions.py')
-rw-r--r-- | modules/ui_gradio_extensions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/ui_gradio_extensions.py b/modules/ui_gradio_extensions.py index b824b113..0d368f8b 100644 --- a/modules/ui_gradio_extensions.py +++ b/modules/ui_gradio_extensions.py @@ -2,12 +2,12 @@ import os import gradio as gr
from modules import localization, shared, scripts
-from modules.paths import script_path, data_path
+from modules.paths import script_path, data_path, cwd
def webpath(fn):
- if fn.startswith(script_path):
- web_path = os.path.relpath(fn, script_path).replace('\\', '/')
+ if fn.startswith(cwd):
+ web_path = os.path.relpath(fn, cwd)
else:
web_path = os.path.abspath(fn)
|