On 27/06/2024 19:27, r...@apache.org wrote:
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
      new 62567d8321 Try to adjust for Windows
62567d8321 is described below

commit 62567d8321ef8fae2f4c07d0b617281b3952ce2b
Author: remm <r...@apache.org>
AuthorDate: Thu Jun 27 20:26:59 2024 +0200

     Try to adjust for Windows

Thanks for this fix.

I'm going to look and see if I can find a cleaner normalization option here as I am a little worried what might happen with one of the less common file systems.

Mark


---
  java/org/apache/jasper/compiler/ParserController.java | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/jasper/compiler/ParserController.java 
b/java/org/apache/jasper/compiler/ParserController.java
index b35f58331d..2d89348a1e 100644
--- a/java/org/apache/jasper/compiler/ParserController.java
+++ b/java/org/apache/jasper/compiler/ParserController.java
@@ -533,7 +533,7 @@ class ParserController implements TagConstants {
          String fileName = inFileName.replace('\\', '/');
          boolean isAbsolute = fileName.startsWith("/");
          if (!isAbsolute) {
-            fileName = Paths.get(baseDirStack.peekFirst() + 
fileName).normalize().toString();
+            fileName = Paths.get(baseDirStack.peekFirst() + 
fileName).normalize().toString().replace('\\', '/');
          }
          String baseDir = fileName.substring(0, fileName.lastIndexOf('/') + 1);
          baseDirStack.addFirst(baseDir);


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to