-
Notifications
You must be signed in to change notification settings - Fork 41
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
Quote file names in ConvertUI #2793
Conversation
Good catch, and I suspect there are others like this elsewhere in the code. Trying to robustly quote filenames will always be problematic (what happens if my directory name has a " in it?) and Rather than trying to quote filenames to put them in a string and give them to https://docs.python.org/3/library/subprocess.html#subprocess.run |
I think this should be against 6.0.0 not main. Particularly given the comments by @llimeht who points out that this is a tiny band-aid for a much larger problem than continuously bites us. However his suggestion seems like it will require skills beyond mine or the author's and the question is whether anybody else will be able to address this "properly" in the near future? If not I would recommend we merge this into 6.0.0 and create an issue with @llimeht suggestions given it fixes a problem we had at the contributor camp? |
@lucas-wilkins suggests fixing the way @llimeht suggests but only for this issue before merging "should not be hard to do" - but says it is better than no change. |
@lucas-wilkins suggests this will be "easy" ... looking this up and reading a bit about it do you mean we should replace run_line = f"pyside6-rcc {in_file} -o {out_file}"
os.system(run_line) with run_line = ["fpyside6-rcc", in_file, "-o" ,out_file]
subprocess.run(run_line) ?? |
@butlerpd Yeah, looks right to me. |
OK thanks ... I'll give it a go then |
ee83fa1
to
79f2594
Compare
Description
Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.
Fixed issue: convertUI does not create a outfiles when a space is present in a folder of the path. The issue was fixed properly quoting the files name in the convert UI.
Fixes #2791
How Has This Been Tested?
After this change, run.py can start the application
Review Checklist (please remove items if they don't apply):