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

folder name containing invalid characters in the temp folder #832

Open
LittleJake opened this issue Aug 3, 2023 · 10 comments
Open

folder name containing invalid characters in the temp folder #832

LittleJake opened this issue Aug 3, 2023 · 10 comments

Comments

@LittleJake
Copy link

LittleJake commented Aug 3, 2023

Please describe your suggestion, and the problem it'd solve.

When comic's filename contains japanese, folder name will contain invalid characters in the temp folder.

Additional context

Snipaste_2023-08-03_22-49-13

image

@Difegue
Copy link
Owner

Difegue commented Aug 3, 2023

👋 This is a known issue -- I never thought it was a real problem considering the temp folder is well, temporary in nature.

Would fixing this help you in any fashion? I'll admit I don't know if the issue is on the libarchive side or if it's just because we're not decoding a folder name properly.

@polak14
Copy link
Contributor

polak14 commented Aug 3, 2023

I think we might have to unzip with shift-jis charset?

@LittleJake
Copy link
Author

If not mind, is it okay to use some sort of hash values in place of the exact zip name?

@siliconfeces
Copy link
Contributor

Does it cause an actual problem (like images not showing up) or is it just annoying?

@LittleJake
Copy link
Author

Well, it will cause web title showing unexpected characters. Besides, it's not capable to fully backup to windows machine unless in compressed format or ignorance of the temp folder.

@Difegue
Copy link
Owner

Difegue commented Aug 6, 2023

Web title should use whatever's stored in metadata - - I think the only place we show the true filenames is next to the resolution/size metadata in the reader.

@LittleJake
Copy link
Author

Web title should use whatever's stored in metadata - - I think the only place we show the true filenames is next to the resolution/size metadata in the reader.

Yep.

@Difegue Difegue added this to the Volunteers welcome milestone Aug 6, 2023
@Difegue
Copy link
Owner

Difegue commented Aug 6, 2023

Tagging as volunteers just in case someone cares enough to fix this - I don't think we should use hashes though, that sounds like more trouble than it's worth. (Need to handle internal folders and subfolders in archives, avoid collisions etc etc)

At the same time I'm not convinced we should try guessing charsets and converting on the fly, that's liable to break depending on what filesystem the server is running on -- There's a reason most FS code in the current codebase just uses the raw bytes without trying to do any conversion.

@LittleJake
Copy link
Author

@Difegue

Another problem shows up with the encoding.

The place holder will not work as expected.

image

@Difegue
Copy link
Owner

Difegue commented Aug 9, 2023

That's because it's a folder, as mentioned in the error message. There's no need to create a placeholder in those scenarios 😛

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

No branches or pull requests

4 participants