-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path.of(uri) returns an empty string for union filesystem URIs, breaking IEnvironment MODLIST file information #20
Comments
This should be fixed by: #26 triaging as such on that PR. |
Is there otherwise a good workarund for actually getting the path in 1.18.x? |
The core issue is that it is NOT returning an 'empty string' it is returning a Path object with a toString of "", as does a ZipPath for the root of a zip file. So it all depends on exactly what you're trying to use the 'string' version for. |
It's |
Okay, i have no idea what cpw's intention for that "file" entry ever was. My main concern is actually understanding your useecase. |
I didn't have the time and motivation to actually write down a proper response here (a job sucking out all my energy and time). I've been using this in my already very hacky tool that allows loading optifine in dev environment to actually get the location of optifine jar. I already have a hacky workaround that works and since it won't be fixed in one version, the hack will have to stay anyway so getting this fixed won't change much for me. I reported it mostly because I saw it being broken when it's clearly what wasn't intended. |
Fixed in modlauncher - where the problem really was. The behaviour of Paths is fine. |
Due to this issue, it's impossible to get the file path of a mod from IEnvironment MODLIST, as it always returns an empty string.
Path.of(uri)
is used inServiceLoaderUtils.fileNameFor()
The text was updated successfully, but these errors were encountered: