2007-04-05 Dick Porter <dick@ximian.com>
[mono.git] / mcs / class / corlib / System.IO / Directory.cs
index 56bcae86c3dd82864112bfeee8f3c4805317b008..a802b10c8c840df7c7cc68792e43cede60e0b0aa 100644 (file)
@@ -42,7 +42,9 @@ using System.Collections;
 using System.Security;
 using System.Security.Permissions;
 using System.Text;
+#if NET_2_0
 using System.Security.AccessControl;
+#endif
 
 namespace System.IO
 {
@@ -152,7 +154,7 @@ namespace System.IO
                                 * So maybe this could be handled somewhere else?
                                 */
                                if (error == MonoIOError.ERROR_FILE_NOT_FOUND) 
-                                       throw new DirectoryNotFoundException ("Directory '" + path + "' doesnt exists.");
+                                       throw new DirectoryNotFoundException ("Directory '" + path + "' does not exist");
                                else
                                        throw MonoIO.GetException (path, error);
                        }
@@ -501,21 +503,22 @@ namespace System.IO
                                throw new ArgumentException ("Path is invalid", "path");
                        }
 
-                       string [] result = MonoIO.GetFileSystemEntries (wildpath, pattern, (int) attrs, (int) mask, out error);
+                       string path_with_pattern = Path.Combine (wildpath, pattern);
+                       string [] result = MonoIO.GetFileSystemEntries (path, path_with_pattern, (int) attrs, (int) mask, out error);
                        if (error != 0)
                                throw MonoIO.GetException (wildpath, error);
-
+                       
                        return result;
                }
 
 #if NET_2_0
-               [MonoLimitation ("Mono always throws PlatformNotSupported regardless of the platfor")]
+               [MonoNotSupported ("DirectorySecurity isn't implemented")]
                public static DirectorySecurity GetAccessControl (string path, AccessControlSections includeSections)
                {
                        throw new PlatformNotSupportedException ();
                }
 
-               [MonoLimitation ("Mono always throws PlatformNotSupported regardless of the platfor")]
+               [MonoNotSupported ("DirectorySecurity isn't implemented")]
                public static DirectorySecurity GetAccessControl (string path)
                {
                        throw new PlatformNotSupportedException ();