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

CR Save Text to File Node does not work correctly #180

Open
Joly0 opened this issue Jun 20, 2024 · 0 comments
Open

CR Save Text to File Node does not work correctly #180

Joly0 opened this issue Jun 20, 2024 · 0 comments

Comments

@Joly0
Copy link

Joly0 commented Jun 20, 2024

I have noticed, that files saved using that node use a "" instead of "/" for the concatenation between the path string and the filename string. So when i put path as "/config/images" and the filename is "comfyui01.png", then the output path would be "/config/images\comfyui01.txt".

Somehow then this is not correctly saved and the file ends up as this "/config/56as4dfg56.txt"

I got around this by changing this line

filepath = output_file_path + "\\" + file_name + "." + file_extension
to:
filepath = output_file_path + "/" + file_name + "." + file_extension

I might assume, that this is only an issue on linux, as in windows the delimiter for paths is \ and not / like for linux.

Some check here might be useful. Though i think instead of checking the os, it should check the delimiter of the input path and try to parse, which one is used there

Though i noticed, with my change the path thats outputed in the log is shown as "/config/images//comfyui01.txt", so double // here, but its still saving correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant