[Mono-bugs] [Bug 55341][Maj] New - Directory.GetParent(path) does not throw PathTooLongException

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 9 Mar 2004 04:31:08 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by nrathna@novell.com.

http://bugzilla.ximian.com/show_bug.cgi?id=55341

--- shadow/55341	2004-03-09 04:31:08.000000000 -0500
+++ shadow/55341.tmp.27697	2004-03-09 04:31:08.000000000 -0500
@@ -0,0 +1,49 @@
+Bug#: 55341
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Red Hat 8.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: nrathna@novell.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Directory.GetParent(path) does not throw PathTooLongException
+
+Description of Problem:
+Directory.GetParent(path) does not throw PathTooLongException
+
+Steps to reproduce the problem:
+1. call irectory.GetParent(path) with path having more than 286 chars
+
+string path ="abcdefghijklmnopqrstuvwxyz"    
+path=path+path+path+path+path+path+path+path+path+path+path;
+	
+[Test]
+[ExpectedException (typeof (PathTooLongException))]
+public void DirectoryGetParent()
+{
+	try
+	{
+		DirectoryInfo dirInfo = Directory.GetParent(path);
+	}
+	finally {}
+}
+
+Actual Results:
+throws ArgumentException
+
+Expected Results:
+Should throw PathTooLongException
+
+How often does this happen? 
+Continous
+
+Additional Information:
+Should check for the path length