Skip to content

Commit

Permalink
Merge pull request mono#3419 from ntherning/fix-MonoTests.System.IO.D…
Browse files Browse the repository at this point in the history
…irectoryTest.DeleteDirectoryOnExistingFileName-on-win

Fixes MonoTests.System.IO.DirectoryTest.DeleteDirectoryOnExistingFileName on  Windows
  • Loading branch information
ntherning authored Aug 19, 2016
2 parents ddcd0f7 + 9088f5a commit d185b75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions mcs/class/corlib/System.IO/MonoIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ public static Exception GetException (string path,
case MonoIOError.ERROR_NOT_SAME_DEVICE:
message = "Source and destination are not on the same device";
return new IOException (message, unchecked((int)0x80070000) | (int)error);

case MonoIOError.ERROR_DIRECTORY:
message = "The directory name is invalid";
return new IOException (message, unchecked((int)0x80070000) | (int)error);

default:
message = String.Format ("Win32 IO returned {0}. Path: {1}", error, path);
Expand Down
4 changes: 2 additions & 2 deletions mcs/class/corlib/System.IO/MonoIOError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ internal enum MonoIOError: int {
WAIT_TIMEOUT = 258,
ERROR_NO_MORE_ITEMS = 259,
ERROR_CANNOT_COPY = 266,
ERROR_DIRECTORY = 267,
ERROR_EAS_DIDNT_FIT = 275,
*/ ERROR_DIRECTORY = 267,
/* ERROR_EAS_DIDNT_FIT = 275,
ERROR_EA_FILE_CORRUPT = 276,
ERROR_EA_TABLE_FULL = 277,
ERROR_INVALID_EA_HANDLE = 278,
Expand Down

0 comments on commit d185b75

Please sign in to comment.