Skip to content

Commit

Permalink
[MNG-6071] Normalize relative paths for working directory
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Jan 26, 2020
1 parent 96e11e1 commit cdb2cd0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

import java.io.File;
import java.nio.file.Paths;

/**
* Resolve relative file path against the given base directory
Expand All @@ -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();
}
}
}

0 comments on commit cdb2cd0

Please sign in to comment.