mirror of
https://github.com/apache/maven.git
synced 2025-03-08 17:49:15 +00:00
[MNG-6071] Normalize relative paths for working directory
This commit is contained in:
parent
66a4381377
commit
68e02c27e1
@ -20,6 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolve relative file path against the given base directory
|
* Resolve relative file path against the given base directory
|
||||||
@ -43,7 +44,7 @@ else if ( file.getPath().startsWith( File.separator ) )
|
|||||||
}
|
}
|
||||||
else
|
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