In XP prod run mode, .exists() returns true for files as it should, but also for directories whose name don't end with a slash - as it shouldn't. This keeps the redirect/index fallback feature from working in prod mode.
Likely cause: in IoService in dev mode, url.getProtocol() returns "file" for both directories and files. Then, Files.isDirectory( Path.of( url.toURI()) can be used to determine if a url points to a directory, and return false.
In prod mode however, url.getProtocol() returns "bundle" for both files and directories, and this causes .exists() to return true in both cases.
In XP prod run mode,
.exists()
returnstrue
for files as it should, but also for directories whose name don't end with a slash - as it shouldn't. This keeps the redirect/index fallback feature from working in prod mode.Likely cause: in IoService in dev mode, url.getProtocol() returns
"file"
for both directories and files. Then,Files.isDirectory( Path.of( url.toURI())
can be used to determine if a url points to a directory, and return false.In prod mode however,
url.getProtocol()
returns"bundle"
for both files and directories, and this causes.exists()
to returntrue
in both cases.