You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2019/03/29 10:10:39 UTC

[maven] 01/01: [MNG-6071] Normalize relative paths for working directory

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch MNG-6071
in repository https://gitbox.apache.org/repos/asf/maven.git

commit a5a77859c61017db40953e6792b6a34bdecf2e35
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Mon Nov 12 22:39:48 2018 +0100

    [MNG-6071] Normalize relative paths for working directory
---
 maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index b99783d..706050d 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -100,6 +100,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintStream;
 import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
@@ -1630,7 +1631,7 @@ public class MavenCli
         }
         else
         {
-            return new File( workingDirectory, file.getPath() ).getAbsoluteFile();
+            return Paths.get( workingDirectory, file.getPath() ).normalize().toFile();
         }
     }