[scarpet] Failure to read contents of files containig uppercase characters
Firigion opened this issue ยท 2 comments
Steps to reproduce:
- Create a script
test.sc
and a corresponding data directorytest.data
in a world's scripts folder. - Place a txt file in the data directory with some random contents,
testing
, for example. Crucially: name the fileTest.txt
, mind the uppercase T. - Edit
test.sc
to read from the file like so:print(read_file('Test', 'text'))
- When loading the app with
/script load test
, the app printsnull
.
Expected behaviour:
When loading the app, it should print testing
.
MC version: 1.18.2
Carpet version: 1.4.66
I think this may be the cause, not tested yet though:
fabric-carpet/src/main/java/carpet/script/argument/FileArgument.java
Lines 141 to 144 in c919a8c