Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace platform dependent path separators #139

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nodes/nodes_animation_schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def INPUT_TYPES(s):
CATEGORY = icons.get("Comfyroll/Animation/Schedule")

def csvoutput(self, output_file_path, file_name, schedule, file_extension):
filepath = output_file_path + "\\" + file_name + "." + file_extension
filepath = os.path.join(output_file_path, file_name + "." + file_extension)

index = 2

Expand All @@ -225,7 +225,7 @@ def csvoutput(self, output_file_path, file_name, schedule, file_extension):

while os.path.exists(filepath):
if os.path.exists(filepath):
filepath = output_file_path + "\\" + file_name + str(index) + "." + file_extension
filepath = os.path.join(output_file_path, file_name + str(index) + "." + file_extension)

index = index + 1
else:
Expand Down Expand Up @@ -267,7 +267,7 @@ def csvinput(self, input_file_path, file_name, file_extension):

show_help = "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/Schedule-Nodes#cr-load-schedule-from-file"

filepath = input_file_path + "\\" + file_name + "." + file_extension
filepath = os.path.join(input_file_path, file_name + "." + file_extension)
print(f"CR Load Schedule From File: Loading {filepath}")

lists = []
Expand Down
2 changes: 1 addition & 1 deletion nodes/nodes_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ def load_list(self, input_file_path, file_name, file_extension):

show_help = "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/List-Nodes#cr-load-value-list"

filepath = input_file_path + "\\" + file_name + "." + file_extension
filepath = os.path.join(input_file_path, file_name + "." + file_extension)
print(f"CR Load Values: Loading {filepath}")

list = []
Expand Down
4 changes: 2 additions & 2 deletions nodes/nodes_utils_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def save_list(self, multiline_text, output_file_path, file_name, file_extension)

show_help = "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/List-Nodes#cr-save-text-to-file"

filepath = output_file_path + "\\" + file_name + "." + file_extension
filepath = os.path.join(output_file_path, file_name + "." + file_extension)

index = 1

Expand All @@ -172,7 +172,7 @@ def save_list(self, multiline_text, output_file_path, file_name, file_extension)

while os.path.exists(filepath):
if os.path.exists(filepath):
filepath = output_file_path + "\\" + file_name + "_" + str(index) + "." + file_extension
filepath = os.path.join(output_file_path, file_name + "_" + str(index) + "." + file_extension)
index = index + 1
else:
break
Expand Down