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

Filenames - Windows compatible #31

Closed
dontobi opened this issue May 17, 2022 · 2 comments
Closed

Filenames - Windows compatible #31

dontobi opened this issue May 17, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@dontobi
Copy link

dontobi commented May 17, 2022

Description of the bug
I have been using pytr for a few days. I load the PDF's into a folder that is shared via SMB. Unfortunately I can't open some files under Windows, because they are named with characters that Windows doesn't support.

To Reproduce
Steps to reproduce the behavior:

  1. Run the command pytr dl_docs <smb_dir>
  2. Open the SMB Share
  3. Try to open a file

Expected behavior
The files should be saved Windows compliant.

Error log
N/A

Environment

  • OS: RaspberryPiOS armv7
  • pytr version: 0.0.15

Additional context
I access the SMB share with multiple Windows 10 (21H2) devices.

@dontobi dontobi added the bug Something isn't working label May 17, 2022
@marzzzello
Copy link
Collaborator

pytr uses pathvalidate to sanitize the file path. It is currently set to auto, which means that the validation depends on the platform pytr is running on. I will make an option to use universal filepaths.
The Windows/Universal characterset is pretty limited that's why I don't want to enforce it on Linux/MacOS users

@dontobi
Copy link
Author

dontobi commented May 17, 2022

If there was a parameter, that would be great. So everyone could decide for himself what to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants