LANraragi icon indicating copy to clipboard operation
LANraragi copied to clipboard

folder name containing invalid characters in the temp folder

Open LittleJake opened this issue 1 year ago • 10 comments

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

LittleJake avatar Aug 03 '23 14:08 LittleJake

👋 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.

Difegue avatar Aug 03 '23 15:08 Difegue

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

polak14 avatar Aug 03 '23 17:08 polak14

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

LittleJake avatar Aug 04 '23 10:08 LittleJake

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

siliconfeces avatar Aug 04 '23 12:08 siliconfeces

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.

LittleJake avatar Aug 04 '23 12:08 LittleJake

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.

Difegue avatar Aug 06 '23 12:08 Difegue

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.

LittleJake avatar Aug 06 '23 12:08 LittleJake

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.

Difegue avatar Aug 06 '23 20:08 Difegue

@Difegue

Another problem shows up with the encoding.

The place holder will not work as expected.

image

LittleJake avatar Aug 09 '23 12:08 LittleJake

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

Difegue avatar Aug 09 '23 12:08 Difegue