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.
}\r
}\r
\r
+ [Test]\r
+ public void CreateDirectoryRelativePath ()\r
+ {\r
+ var path = Path.Combine (TempFolder, "relativepath", "not_this_folder");\r
+ path = Path.Combine (path, "..");\r
+\r
+ var res = Directory.CreateDirectory (path);\r
+ Assert.AreEqual ("relativepath", res.ToString (), "#1");\r
+ Assert.IsTrue (Directory.Exists (Path.Combine (TempFolder, "relativepath")), "#2");\r
+ }\r
+\r
[Test]\r
public void Delete ()\r
{\r