Hyperlinq to file path with spaces does not work
Options
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
-
I'm running in to this as well, even on the latest (at this time) beta build 4.52.1. A fix would be appreciated.
Thanks -
Thanks for reporting - this is fixed in the latest beta:
http://www.linqpad.net/beta.aspx -
Awesome. Confirmed working in 4.5.2.2.
Thanks Joe, your work on LinqPad is greatly appreciated. -
I'm facing this issue with Linqpad 5.10.00
Steps to repeat:var dir = @"d:/test dir/"; Directory.CreateDirectory(dir); new Hyperlinq(dir).Dump(); // link with spaces won't work
-
Workaround (ugly):
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. -
Thanks - this will be fixed for the next build.
-
This is now fixed in the 5.21 beta:
http://www.linqpad.net/download.aspx#beta