Bug 51781 - The Uri class no longer detects Unix paths
Summary: The Uri class no longer detects Unix paths
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 4.6.0 (C8)
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
Depends on:
Reported: 2017-01-26 08:55 UTC by Tom
Modified: 2017-01-31 16:54 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Tom 2017-01-26 08:55:03 UTC
The Uri class is no longer detecting Unix file paths. This is due to the '#else' being removed here: https://github.com/mono/mono/commit/0c44dca122d519ccaa13cab1d7896d5a13dffda4#diff-09bdf7c140acd7c5c350e32721dc5361L3650
Comment 1 Andres G. Aragoneses 2017-01-26 10:08:01 UTC
> The Uri class is no longer detecting Unix file paths

Can you put an example? An exact minimal testcase please.
Comment 2 Tom 2017-01-26 10:25:42 UTC
new Uri("/tmp");

this will throw on 4.6+ but not on earlier versions
Comment 3 Tom 2017-01-26 10:41:03 UTC
> 4.6+

4.6 and later
Comment 4 Marek Safar 2017-01-31 16:07:52 UTC
It works for me as expected with Mono 4.8 and master
Comment 5 Tom 2017-01-31 16:46:15 UTC
Hi, do you know how this works even though the code is ifdef !platform_unix? See link in first comment. Thx