Bug 18361

Summary: FileInfo.MoveTo does not work with absolute paths
Product: [Mono] Class Libraries Reporter: Aaron Bockover [MSFT] <abock>
Component: mscorlibAssignee: marcos.henrich
Status: RESOLVED FIXED    
Severity: normal CC: marcos.henrich, mono-bugs+mono
Priority: ---    
Version: master   
Target Milestone: Untriaged   
Hardware: Macintosh   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:

Description Aaron Bockover [MSFT] 2014-03-13 13:08:59 UTC
new FileInfo ("/Users/aaron/fileinfotest").MoveTo ("fileinfotest")

I would expect the above to move "/Users/aaron/fileinfotest" to $PWD/fileinfotest, but the move never happens.

File.Move ("/Users/aaron/fileinfotest", "fileinfotest") however works as expected.

new FileInfo ("a").MoveTo ("b") however does work... there seems to be an issue with absolute paths. This is tested on 3.4.0 (Mono JIT compiler version 3.4.0 ((no/6b959ef Mon Mar 10 12:30:52 EDT 2014)).
Comment 1 marcos.henrich 2016-02-16 11:29:54 UTC
Should be fixed by https://github.com/mono/mono/pull/2623.
Comment 2 marcos.henrich 2016-02-16 13:59:58 UTC
Fixed in mono/master 455d287931bc79b70e162c765bba2396b92023b7.
https://github.com/mono/mono/commit/455d287931bc79b70e162c765bba2396b92023b7