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

Fails on filenames including more than one '.' #2

Open
cosmocracy opened this issue Jul 22, 2021 · 0 comments · May be fixed by #3
Open

Fails on filenames including more than one '.' #2

cosmocracy opened this issue Jul 22, 2021 · 0 comments · May be fixed by #3

Comments

@cosmocracy
Copy link

When attempting to handle filenames/filepaths that include more than one '.' character, the library infers the wrong file type since it arbitrarily looks for the "qvd"/"xml" extension after the first period. Better to use a regular expression to make this determination. I fixed a fork of this by revising qvdfile.py by adding:

import re

And changing line 25 to:

self.mode = os.O_RDONLY if re.match('^.*qvd$', name, re.IGNORECASE) else os.O_WRONLY

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

Successfully merging a pull request may close this issue.

1 participant