Merge pull request #2869 from BrzVlad/feature-mod-union-opt
[mono.git] / mcs / class / corlib / System.IO / Directory.cs
index 64d5b7dbb76fddf87d40a64bb3de6f9947025fbc..3c7e87a6b7ac78ad8fbe13e42343fb67337d0698 100644 (file)
@@ -96,7 +96,7 @@ namespace System.IO
                                 info.Parent.Create ();
 
                        MonoIOError error;
-                       if (!MonoIO.CreateDirectory (path, out error)) {
+                       if (!MonoIO.CreateDirectory (info.FullName, out error)) {
                                // LAMESPEC: 1.1 and 1.2alpha allow CreateDirectory on a file path.
                                // So CreateDirectory ("/tmp/somefile") will succeed if 'somefile' is
                                // not a directory. However, 1.0 will throw an exception.
@@ -498,7 +498,6 @@ namespace System.IO
                        return result;
                }
 
-#if NET_4_0
                public static string[] GetFileSystemEntries (string path, string searchPattern, SearchOption searchOption)
                {
                        // Take the simple way home:
@@ -632,7 +631,6 @@ namespace System.IO
                        return EnumerateKind (path, "*", SearchOption.TopDirectoryOnly, FileAttributes.Normal | FileAttributes.Directory);
                }
                
-#endif
 
                public static DirectorySecurity GetAccessControl (string path, AccessControlSections includeSections)
                {