Bug 833 - Path.GetFullPath returns duplicate DirectorySeparatorStr if Directory.GetCurrentDirectory() == DirectorySeparatorStr
Summary: Path.GetFullPath returns duplicate DirectorySeparatorStr if Directory.GetCurr...
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 2.10.x
Hardware: All All
: --- minor
Target Milestone: Untriaged
Assignee: João Matos
Depends on:
Reported: 2011-09-15 09:54 UTC by Andrew Finnell
Modified: 2014-08-08 14:05 UTC (History)
2 users (show)

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

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 Andrew Finnell 2011-09-15 09:54:50 UTC
When Directory.GetCurrentDirectory() == '/' on a Unix system, Path.GetFullPath("test.txt") return "//test.txt". Simple check needs to be added to see if the current directory ends in a DirectorySeparatorStr.
Comment 1 Andrew Finnell 2011-09-15 10:57:23 UTC
Comment 2 Andrew Finnell 2014-08-06 16:37:40 UTC
This appears to have been open for a while. Is this fix being merged or rejected?
Comment 3 João Matos 2014-08-06 16:42:23 UTC
I'm looking into it. So far I've reproduced the issue with a test case and confirmed your suggested fix fixes the original issue.

Reading the Github thread, it seems there were also some issues on Windows? I wanted to check that first before getting this in.

Thanks for the bug report and sorry for the long wait on getting this processed.