diff options
Diffstat (limited to 'mcs/class/referencesource/mscorlib/system/io/path.cs')
-rw-r--r-- | mcs/class/referencesource/mscorlib/system/io/path.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mcs/class/referencesource/mscorlib/system/io/path.cs b/mcs/class/referencesource/mscorlib/system/io/path.cs index f260924b1d0..b4cb0ab7e36 100644 --- a/mcs/class/referencesource/mscorlib/system/io/path.cs +++ b/mcs/class/referencesource/mscorlib/system/io/path.cs @@ -7,7 +7,7 @@ ** ** Class: Path ** -** <OWNER>Microsoft</OWNER> +** <OWNER>[....]</OWNER> ** ** ** Purpose: A collection of path manipulation methods. @@ -673,17 +673,17 @@ namespace System.IO { // might be well within the MAX_PATH restriction. For ex, // "c:\SomeReallyLongDirName(thinkGreaterThan_MAXPATH)\..\foo.txt" which actually requires a // buffer well with in the MAX_PATH as the normalized path is just "c:\foo.txt" - // This buffer requirement seems wrong, it could be a - - + // This buffer requirement seems wrong, it could be a bug or a perf optimization + // like returning required buffer length quickly or avoid stratch buffer etc. + // Either way we need to workaround it here... // Ideally we would get the required buffer length first by calling GetFullPathName // once without the buffer and use that in the later call but this doesn't always work - // due to Win32 GetFullPathName - - - - + // due to Win32 GetFullPathName bug. For instance, in Win2k, when the path we are trying to + // fully qualify is a single letter name (such as "a", "1", ",") GetFullPathName + // fails to return the right buffer size (i.e, resulting in insufficient buffer). + // To workaround this bug we will start with MAX_PATH buffer and grow it once if the + // return value is > MAX_PATH. result = newBuffer.GetFullPathName(); |