haskell / directory

Platform-independent library for basic file system operations
https://hackage.haskell.org/package/directory
Other
58 stars 47 forks source link

canonicalizePath returns a path which exists, but cannot be openned #104

Closed coot closed 4 years ago

coot commented 4 years ago

The following error is Windows specific, I encountered it while compiling with cabal on a VM which shares a directory with the host using a network drive (this is what VirtualBox does). The original bug report is here https://github.com/haskell/cabal/issues/6308. The gist of the problem is that:

>>> canonicalizePath "some.file"
"\\\\VBoxSvr\\iohk\\some.file"
>>> makeAbsolute "some.file"
"Z:\\some.file"
coot commented 4 years ago

I tracked down that it's getFinalPathName which is an ffi call to GetFinalPathName that returns the "\\BVoxSvr\iohk" path.

coot commented 4 years ago

this will be fixed upstream