Hyperlinq to file path with spaces does not work
I stumbled across this during some testing. Any path with spaces does not get rendered as a link, it's converted to a uri string. It might make sense for urls but not so much for file paths.
Could this be fixed?
e.g.,
yields:
Could this be fixed?
e.g.,
new[] {
new Hyperlinq("http://www.example.com/path?q=query+without+spaces"),
new Hyperlinq("http://www.example.com/path?q=query with spaces"),
new Hyperlinq(@"c:\file.txt"),
new Hyperlinq(@"c:\new folder\file.txt"),
}.Dump();
yields:
http://www.example.com/path?q=query+without+spaces (clickable link)
http://www.example.com/path?q=query with spaces (text)
c:\file.txt (clickable link)
file:///c:/new folder/file.txt (text)
Comments
Thanks
http://www.linqpad.net/beta.aspx
Thanks Joe, your work on LinqPad is greatly appreciated.
Steps to repeat:
new Hyperlinq(() => Process.Start("explorer.exe", new DirectoryInfo(dir).FullName), dir).Dump();
Explicitly specifying "explorer.exe" ensures window opens in foreground.
DirectoryInfo ensures \ or / slashes compatibility in paths.
http://www.linqpad.net/download.aspx#beta