Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Fake / F# globbing not work on UNC paths

I have a small test script reproducing the problem

// include Fake lib
#r @"tools\FAKE\tools\FakeLib.dll"
open Fake 

let root = @"\\wgprintsrv\FTP\FTPSoftware\FTPSW\weincad\release"

let glob = root @@ "**\*.dll"

trace glob

!! glob
|> Seq.iter (fun file -> trace file )

it lists nothing. Just to check the following powershell command

ls -R \\wgprintsrv\FTP\FTPSoftware\FTPSW\weincad\release -Filter *.dll

generates everything I expect. If I replace the UNC path with a local relative path then everything works. Is this possible to work around or is it a core problem with UNC paths and F# globbing?

like image 810
bradgonesurfing Avatar asked Dec 05 '25 16:12

bradgonesurfing


1 Answers

Not too user friendly but the glob doesn't recognize absolute paths. You have to set the base directory like so

// include Fake lib
#r @"tools\FAKE\tools\FakeLib.dll"
open Fake 

let root = @"\\wgprintsrv\FTP\FTPSoftware\FTPSW\weincad\release"

let glob = "**\*.dll"

trace glob

!! glob
|> SetBaseDir root
|> Seq.iter (fun file -> trace file )
like image 53
bradgonesurfing Avatar answered Dec 08 '25 15:12

bradgonesurfing