Bug in project.file(..) on Windows

Looks like there is a bug in project.file() on Windows. If you add to a build script

println new File('/any')
println project.file(new File('/any'))

You’ll get something like:

\any
C:\projects\junit5\any

from the build. This seems wrong, per the docs and absolute path will be used and not relativized. Thoughts on whats going on?

1 Like

My guess is that new File('/any').absolute == false, because the file separator on Windows is \.