OpenComputers II

OpenComputers II

27.1k Downloads

Datapack filesystems cannot contain capital letters

Emmixis opened this issue · 8 comments

commented

A Datapack containing a text file, in correct format, is not mounted with the rest of the datapack data

exerpt from log:

[15:04:38] [Worker-Main-23/INFO] [li.ci.oc.co.bu.de.da.FileSystems/]: Searching for datapack filesystems...
[15:04:38] [Worker-Main-23/INFO] [li.ci.oc.co.bu.de.da.FileSystems/]: Found [oc2:file_systems/scripts.fs.json]
[15:04:38] [Worker-Main-23/INFO] [li.ci.oc.co.bu.de.da.FileSystems/]:   Adding layer with [3] file(s).

Datapack structure:

└─data └─oc2 └─file_systems └─emmi └─Scripts
commented

I think that people making a data pack wouldn't have too much trouble making and unpacking tars, be it with wsl or with 7zip, and you could always allow the MCMETA file as an alternative, allowing windows creators to utilize mcmeta, while linux creators utilize chmod.

commented

Killed the resource system based fs stuff in favor of zip files now, via 89dccda.
Annoyingly Java's ZipEntry stuff doesn't really support permissions, so everything in the zips is +x for the time being. Still, more robust than the datapack stuff, in particular since directory detection was also broken on Linux hosts.

commented

Hmm. Did you add a .fs.json pointing to that directory? (described in this readme)

Yes, all instructions of the readme were followed

commented

Hmm. Did you add a .fs.json pointing to that directory? (described in this readme)

commented

To clarify why I wish to use this feature, I was hoping to write some scripts such as the ones I proposed in #29

commented

Thanks for investigating! That sounds it's due to MC's resource system then. AFAIK that requires all things to be lower-case. I did not consider this... that is quite the annoying limitation. Will think about alternatives. Thanks again for figuring out the cause.

I know it sounds odd, but perhaps having the ability to use tarballs (.tar) instead of subdirectories of oc2:file_systems would both remove this limitation, and allow for permission preservation (thus also likely removing the need for MCMETA files for each executable).

The only issues this could really introduce is as follows:

  • Pure windows users would be limited, without a way to create a tarball easily
  • Most users probably do not know what a tarball is, nor the steps to create one

p.s. Feel free to change label or close as needed

commented

Found the bug, problem occurs as paths cannot contain capital letters (unsure if fixable or not).

commented

Thanks for investigating! That sounds it's due to MC's resource system then. AFAIK that requires all things to be lower-case. I did not consider this... that is quite the annoying limitation. Will think about alternatives. Thanks again for figuring out the cause.