2002-07-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sun, 28 Jul 2002 05:19:09 +0000 (05:19 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sun, 28 Jul 2002 05:19:09 +0000 (05:19 -0000)
* File.cs:
(Create): allow file names without path.

svn path=/trunk/mcs/; revision=6221

mcs/class/corlib/System.IO/ChangeLog
mcs/class/corlib/System.IO/File.cs

index 455b7a9aeb9487234e15a043e6318a4e3af15b1e..1ba73e41592074cf8562648614364fa05ef39550 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * File.cs:
+       (Create): allow file names without path.
 
 Fri Jul 26 15:45:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
 
index 2c803f72f092234fb0c037250782d8e541a99d11..6032a1b8beb8a4d257a8cf77486921300e2ca6ed 100644 (file)
@@ -88,7 +88,7 @@ namespace System.IO
                                throw new NotSupportedException();\r
 \r
                        string DirName = Path.GetDirectoryName(path);\r
-                       if (!Directory.Exists (DirName))\r
+                       if (DirName != String.Empty && !Directory.Exists (DirName))\r
                                throw new DirectoryNotFoundException("Destination directory not found: " + DirName);\r
                        if (Exists(path)){\r
                                if ((GetAttributes(path) & FileAttributes.ReadOnly) == FileAttributes.ReadOnly){\r