mirror of
https://github.com/apache/maven.git
synced 2025-02-08 02:59:22 +00:00
[MNG-6071] Normalize relative paths for working directory
This commit is contained in:
parent
96e11e1c84
commit
cdb2cd0df3
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
/**
|
||||
* Resolve relative file path against the given base directory
|
||||
@ -43,7 +44,7 @@ else if ( file.getPath().startsWith( File.separator ) )
|
||||
}
|
||||
else
|
||||
{
|
||||
return new File( baseDirectory, file.getPath() ).getAbsoluteFile();
|
||||
return Paths.get( baseDirectory, file.getPath() ).normalize().toFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user