EasyRPG / Tools

Assorted tools to handle RPG Maker 2000/2003 files
https://easyrpg.org/tools/
50 stars 18 forks source link

Inconsistent performance for gencache when there is same filename with different suffix. #67

Closed lychees closed 1 year ago

lychees commented 2 years ago

Early today, we found that gencache might have some encoding error when executed in Linux server.

After some research, we think this is a problem with the behavior of gencache.

image

index.json generated in web servers with linux.

image

indes.json generated in local PC.

image

The resource files.

I think gencache generated different files in different OS. (Afterall, there might even be some case issues under Linux.)

lychees commented 2 years ago

Since we are using small case file name without suffix as map key, I thought there might be some bug, if there is some files with same file name but different capitalization and suffix name? I am not sure.

Ghabry commented 2 years ago

So you are having two files next to each other. One with extension and one without, e.g.

The behaviour is in this case indeed undefined. The result depends on the enumeration order of the filesystem. Windows always reports in alphabetical order and Linux in order when a file was created.

This will be even a problem for our OpenRTP where I think about putting license files next to the image with txt ending.

lychees commented 2 years ago

image

image

Another case for translation files, it might cause some system cannot detect those i18n files.

Ghabry commented 2 years ago

this is probably caused by an out-of-date gencache. Download the latest version. Not removing "po" or "ini" is a change made 2 months ago.