Bug 4626 - Directory.CreateDirectory fails on Windows for paths with '/'
Summary: Directory.CreateDirectory fails on Windows for paths with '/'
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-04-24 15:24 UTC by Jonathan Chambers
Modified: 2016-07-11 13:36 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Test program (1012 bytes, text/plain)
2012-04-24 15:24 UTC, Jonathan Chambers

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jonathan Chambers 2012-04-24 15:24:09 UTC
Created attachment 1739 [details]
Test program

Run the attached test program

Created directory C:\Users\jonathan\development\PathBug\PathBug\bin\Debug\A\B\C
Deleted directory C:\Users\jonathan\development\PathBug\PathBug\bin\Debug\A
Deleted is gone.

C:\Users\jonathan\development\PathBug\PathBug\bin\Debug>mono PathBug.exe

Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part
 of the path "A/B/C"
  at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000
] in <filename unknown>:0
  at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in <file
name unknown>:0
  at PathBug.Program.Bug2 () [0x00000] in <filename unknown>:0
  at PathBug.Program.Main (System.String[] args) [0x00000] in <filename unknown>
Comment 1 Jonathan Chambers 2016-07-11 13:36:29 UTC
This no longer reproduces.