Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
96c2deee
"...git@developer.sourcefind.cn:chenpangpang/diffusers.git" did not exist on "2e8668f0af98032fe402068c641783469e78b2f1"
Commit
96c2deee
authored
Nov 27, 2023
by
comfyanonymous
Browse files
Merge branch 'path_error_fix' of
https://github.com/jeske/ComfyUI
parents
6aa1bcd6
edd6f75d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
folder_paths.py
folder_paths.py
+6
-2
No files found.
folder_paths.py
View file @
96c2deee
...
@@ -228,8 +228,12 @@ def get_save_image_path(filename_prefix, output_dir, image_width=0, image_height
...
@@ -228,8 +228,12 @@ def get_save_image_path(filename_prefix, output_dir, image_width=0, image_height
full_output_folder
=
os
.
path
.
join
(
output_dir
,
subfolder
)
full_output_folder
=
os
.
path
.
join
(
output_dir
,
subfolder
)
if
os
.
path
.
commonpath
((
output_dir
,
os
.
path
.
abspath
(
full_output_folder
)))
!=
output_dir
:
if
os
.
path
.
commonpath
((
output_dir
,
os
.
path
.
abspath
(
full_output_folder
)))
!=
output_dir
:
print
(
"Saving image outside the output folder is not allowed."
)
err
=
"**** ERROR: Saving image outside the output folder is not allowed."
+
\
return
{}
"
\n
full_output_folder: "
+
os
.
path
.
abspath
(
full_output_folder
)
+
\
"
\n
output_dir: "
+
output_dir
+
\
"
\n
commonpath: "
+
os
.
path
.
commonpath
((
output_dir
,
os
.
path
.
abspath
(
full_output_folder
)))
print
(
err
)
raise
Exception
(
err
)
try
:
try
:
counter
=
max
(
filter
(
lambda
a
:
a
[
1
][:
-
1
]
==
filename
and
a
[
1
][
-
1
]
==
"_"
,
map
(
map_filename
,
os
.
listdir
(
full_output_folder
))))[
0
]
+
1
counter
=
max
(
filter
(
lambda
a
:
a
[
1
][:
-
1
]
==
filename
and
a
[
1
][
-
1
]
==
"_"
,
map
(
map_filename
,
os
.
listdir
(
full_output_folder
))))[
0
]
+
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment