Bug 38796 - FileInfo.ToString misbehaving after MoveTo
Summary: FileInfo.ToString misbehaving after MoveTo
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 4.2.0 (C6)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: marcos.henrich
Depends on:
Reported: 2016-02-16 13:58 UTC by marcos.henrich
Modified: 2016-03-22 15:06 UTC (History)
1 user (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 marcos.henrich 2016-02-16 13:58:01 UTC
With .NET when I run:
  var f = new FileInfo(@"C:\tmp\a");
  f.MoveTo ("c");
  Console.WriteLine (f.ToString());
The output is "c"

While when I run:
  var f = new FileInfo(@"/tmp/a");
  f.MoveTo ("c");
  Console.WriteLine (f.ToString());
The output is "/tmp/a"

This issue was discussed in https://github.com/mono/mono/pull/2623
Comment 1 marcos.henrich 2016-03-16 10:13:23 UTC
Should be fixed by https://github.com/mono/mono/pull/2764
Comment 2 marcos.henrich 2016-03-22 15:06:08 UTC
Fixed in master e1403cc11ae3ac5016aa098bdfdca301dcc86296.

The fix will be in cycle 8, mono 4.6.