-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DirectoryInfo.MoveTo does not update the object's Name property #27911
Milestone
Comments
Thanks @alexischr - do you plan to offer a PR? |
Will do, just wanted to get an okay on the fix :) |
alexischr
referenced
this issue
in alexischr/corefx
Nov 14, 2018
alexischr
referenced
this issue
in alexischr/corefx
Nov 14, 2018
danmoseley
referenced
this issue
in dotnet/corefx
Nov 14, 2018
alexischr
referenced
this issue
in mono/corefx
Nov 14, 2018
alexischr
referenced
this issue
in mono/corefx
Nov 15, 2018
Re-initialize DirectoryInfo.Name after a MoveTo() operation
marek-safar
referenced
this issue
in mono/mono
Dec 7, 2018
Includes the following from System.IO: * FileSystemInfo * FileInfo * DirectoryInfo * Directory * FileSystem * Path `Join()` Span API and all of System.IO.Enumeration namespace. Adds about 1600 System.IO tests Behavior changes: * `File.Replace` now replaces files even if they are read-only (using the `rename` syscall on Unix) * Directory enumeration is no longer stable in the way that many Mono tests expect * Some changes in when/whether some representations of directories contain a trailing separator character * Changes in which exceptions are thrown (sometimes these are platform-dependent on CoreFX) Issues: * https://github.com/dotnet/corefx/issues/33486 * https://github.com/dotnet/corefx/issues/33490 Part of #7246
jlennox
referenced
this issue
in jlennox/corefx
Dec 16, 2018
ghost
locked as resolved and limited conversation to collaborators
Dec 15, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The following program prints
DIT.MoveToUpdateProperties.Test
(the original Name) on CoreFX, andDIT.MoveToUpdateProperties3.Test
(the final Name) on .NET Framework and Mono:The issue in the code is here (
_name
is not updated): https://github.com/dotnet/corefx/blob/8bd31a2a571923d3eb86dc728c272d0b6093a4d2/src/System.IO.FileSystem/src/System/IO/DirectoryInfo.cs#L228Using
fileName: null
instead fixes the issue.The text was updated successfully, but these errors were encountered: