Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 15640 [details]
Minimal Example Program
Ensure /tmp/test does not exist. Run the following program:
public static void Main (string args)
var path = "/tmp/test/multifolder/relativepath/not_this_folder";
path = Path.Combine (path, "..");
Expected result (as seen on Windows with adjusted paths):
The folder /tmp/test/multifolder/relativepath/ has been created
The folder /tmp/test/multifolder has been created and the following exception is thrown:
System.IO.DirectoryNotFoundException: Could not find a part of the path "/tmp/test/multifolder/relativepath/not_this_folder/.."
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x0006b] in <filename unknown>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in <filename unknown>:0
at MainClass.Main (System.String args) [0x00014] in /home/kevin/Desktop/Test/TaskTEst/Program.cs:8
> mono --version
Mono JIT compiler version 4.2.3 (Stable 184.108.40.206/832de4b Wed Mar 16 13:19:08 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
LLVM: supported, not enabled.
> cat /proc/version
Linux version 4.2.0-34-generic (buildd@lgw01-54) (gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2) ) #39-Ubuntu SMP Thu Mar 10 22:13:01 UTC 2016
Addition: The same can be observed on Mac OS.
Fixed in master