Skip to content
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

Native Image FileSystem is trailing slash sensitive #5080

Closed
bclozel opened this issue Sep 26, 2022 · 1 comment
Closed

Native Image FileSystem is trailing slash sensitive #5080

bclozel opened this issue Sep 26, 2022 · 1 comment
Assignees
Labels
bug native-image spring spring related issue

Comments

@bclozel
Copy link
Collaborator

bclozel commented Sep 26, 2022

This issue is extracted from a discussion within #5020, but is not strictly related.
When walking the Native Image file system, trailing slashes in paths fails the resolution.

This can be reproduced with the following sample application:

  1. git clone git@github.com:bclozel/native-resources.git
  2. ./gradlew nativeCompile
  3. ./build/native/nativeCompile/native-resources resource:/// first/

The "problem 2" section of the README describes the following problem: resolving "/folder" or "folder" works, but the same with a trailing slash doesn't ("folder/").

I'm not sure if this is a strict requirement or if each FileSystem can behave differently; I think aligning with the default FileSystem would be still the safest bet here, unless the behavior doesn't make sense for an in-memory file system like this.

Here is my environment:

java -version
openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06)
OpenJDK 64-Bit Server VM GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06, mixed mode, sharing)
@jovanstevanovic
Copy link
Member

The fix is on a master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug native-image spring spring related issue
Projects
None yet
Development

No branches or pull requests

4 participants