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

Forbidden character makes download failed #22

Open
roogue opened this issue May 2, 2022 · 1 comment
Open

Forbidden character makes download failed #22

roogue opened this issue May 2, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@roogue
Copy link

roogue commented May 2, 2022

Hey I am not sure if this npm package is still maintained or not, but I will still submit a bug report for it.

Description
As title said, I was unable to perform a complete download due to some filenames contain forbidden character such as spaces, ?, <, >, * ... etc.

Fix
I was able to fix it by replacing those character with empty string.

At ./src/providers/base.ts lines 25

const regex = /( |\/|<|>|:|"|\\|\||\?|\*)+/g;
return regexResult
      ? decodeURIComponent(regexResult[1].replace(regex, ""))
      : "Untitled.osz";

Machine

  • Window 10 21H2 x64

It is a good project anyway, thanks for making things efficient.

@roogue roogue added the bug Something isn't working label May 2, 2022
@loarca
Copy link
Owner

loarca commented May 24, 2022

Hello! sorry I didn't catch up to this issue earlier 😅 I think you're right, I'll look more into it later.
Thank you for spotting this and I'm glad you found it helpful 😅

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