[Mono-dev] Proposed patch for DirectoryInfo.MoveTo

Sebastien Pouliot sebastien.pouliot at gmail.com
Tue Feb 13 14:02:23 EST 2007


Hello Boris,

On Tue, 2007-02-13 at 08:04 -0800, Boris Kirzner wrote:
> Attached patch fixes DirectoryInfo.MoveTo: the full path should be
> updated if MoveTo succeeds.
> 
>  
> 
> Please review
> 
                public void MoveTo (string dest) {
                        Directory.Move (FullPath, Path.GetFullPath
(dest));
+                       this.FullPath = Path.GetFullPath (dest);
                }

Path.GetFullPath is kind of heavy so it would be better to store it's
result in a string variable and use this string on both calls.
 
> 
> Thanks,
> 
> Boris
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list