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

Spaces in file name causes error #5

Closed
joeflack4 opened this Issue Jun 20, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@joeflack4
Contributor

joeflack4 commented Jun 20, 2018

Description

If a user attempts to convert a file with spaces in it, everything after the space is not considered. It tries to convert a file that therefore does not exist and also has no file extension, and it errors.

@joeflack4 joeflack4 self-assigned this Jun 20, 2018

@joeflack4 joeflack4 added the bug label Jun 20, 2018

@tulvit

This comment has been minimized.

Show comment
Hide comment
@tulvit

tulvit Jun 21, 2018

Member

tldr: solved, please, check the "develop-spaces-issue" branch.

Problem

Filenames were used as a parameters for a shell execution, and they were used "as is" without any pre-processing, so extra spaces just ruins the command.

Solution

Shell escaping string. I assume you use Python 3.3 or higher, so I've imported/used shlex module.

Comparing changes: develop vs develop-spaces-issue

Update: ah, I've overlooked that shlex was already imported, and I've just duplicated it - but now all is fixed.

Member

tulvit commented Jun 21, 2018

tldr: solved, please, check the "develop-spaces-issue" branch.

Problem

Filenames were used as a parameters for a shell execution, and they were used "as is" without any pre-processing, so extra spaces just ruins the command.

Solution

Shell escaping string. I assume you use Python 3.3 or higher, so I've imported/used shlex module.

Comparing changes: develop vs develop-spaces-issue

Update: ah, I've overlooked that shlex was already imported, and I've just duplicated it - but now all is fixed.

@joeflack4

This comment has been minimized.

Show comment
Hide comment
@joeflack4

joeflack4 Jun 21, 2018

Contributor

Hey Vitaly. This is awesome, thanks. I will test to confirm the fix shortly!

Contributor

joeflack4 commented Jun 21, 2018

Hey Vitaly. This is awesome, thanks. I will test to confirm the fix shortly!

@joeflack4 joeflack4 assigned tulvit and unassigned joeflack4 Jun 22, 2018

@joeflack4

This comment has been minimized.

Show comment
Hide comment
@joeflack4

joeflack4 Jun 22, 2018

Contributor

Confirmed fixed. Sorry for the delay. Very happy with this fix ^^

Contributor

joeflack4 commented Jun 22, 2018

Confirmed fixed. Sorry for the delay. Very happy with this fix ^^

@joeflack4 joeflack4 closed this Jun 22, 2018

@joeflack4

This comment has been minimized.

Show comment
Hide comment
@joeflack4

joeflack4 Jun 22, 2018

Contributor

Going to merge this into develop.

Contributor

joeflack4 commented Jun 22, 2018

Going to merge this into develop.

This was referenced Jun 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment