Open w4tchdoge opened 8 months ago
I tried to recreate this scenario to try long file names in both files and folders using local source to easily access the files in the file explorer.
Note:
Folder Test (255 chars):
The folder's name is called "This is a sample test folder to test long file names are supported with the mihon app specifically decompressed from a comic book archive with a different storage location. If this is fat 32-the limit is 255 characters. Applies to the same ext4 file sys
"
Conclusion:
Mihon successfully opens the folder version and you can easily view them
File Test (253 chars for file name, 3 characters for the file extension making it 256 chars)
The file name is called "This is a sample test file to test long file names are supported with the mihon app specifically compressed ino a comic book archive with a different storage location. If this is fat 32-the limit is 255 characters. Also applies with - ext4 file system.cbz
" (ignore the typo just to fill it to the max limit)
Conclusion:
Mihon won't open the file due to the "File name too long" error.
External programs like FX file explorer can open the archive without any errors.
Additional notes:
Additional notes:
- It requires testing for external storages (typically SD card) formatted in the common file systems (fat32 and exfat)
I will add that my TachiyomiSY folder is on an SD card, and that's also where I made my Mihon folder when I attempted to reproduce it on Mihon.
As I don't remember reformatting my 256 GB SD card to another file system, I believe it's an exFAT formatted SD card.
While I was researching the limits for the fat32 file system, I stumbled this from a MS website of all places.
Reference: https://learn.microsoft.com/en-us/windows/win32/fileio/filesystem-functionality-comparison#limits
TL;DR: the folder path must not exceed 255 characters.
Possible proposal(?): If the file and folder path (including file extensions) is too long, attempt to shorten the file name (around 250 chars) to include an underscore and the preferred file format something like this:
<250 chars>_.png
Steps to reproduce
Expected behavior
Chapter opens and I can view it.
Actual behavior
A toast notification pops up saying "File name too long".
Crash logs
No response
Mihon version
0.16.2
Android version
Android 14
Device
Samsung Galaxy Tab S8+
Other details
I had first experienced this issue in TachiyomiSY after a recent update where storage related settings were changed. When I asked about this in the
tachiyomi-sy
support channel I was advised to see if I could reproduce this behaviour on Mihon, which I was able to. The following text is the message I had sent in thetachiyomi-sy
support channel after I was able to reproduce the issue in Mihon 0.16.2 (stable)I can reproduce this in Mihon 0.16.2, but I had to move the folder containing the .cbz downloaded by SY to the Mihon local folder and try to open the local source I suspest this is because the external extension has different .cbz naming/foldering than the one built-in source SY has (extenal save the .cbz as
{full gallery name}/Chapter.cbz
while SY saves it as{full gallery name}/{gallery id}_{version}_{full gallery name}.cbz
) if it helps, the{full gallery name}
in this case is 225 characters long, including spacesAcknowledgements