[Mono-bugs] [Bug 40557][Min] Changed - square brackets and braces cause Directory.cs methods to act incorrectly

bugzilla-daemon@indri.ximian.com bugzilla-daemon@indri.ximian.com
Mon, 11 Aug 2003 18:18:29 -0400 (EDT)

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 drteeth@monkeyhouse.ca.


--- shadow/40557	2003-08-11 18:17:31.000000000 -0400
+++ shadow/40557.tmp.445	2003-08-11 18:18:29.000000000 -0400
@@ -68,6 +68,22 @@
 correct, and it's up to the user to do her own escaping.
 ------- Additional Comments From drteeth@monkeyhouse.ca  2003-08-11 18:17 -------
 Created an attachment (id=5098)
 source for the test case
+------- Additional Comments From drteeth@monkeyhouse.ca  2003-08-11 18:18 -------
+i'm not sure what you mean.  How would i escape the brackets?
+escaping the brackets in code like this:
+args[0].Replace( "[", "\\[" ).Replace( "]", "\\]" ) 
+results gives:
+DirectoryNotFoundException: Directory '\[testdir\]' not found.
+..which makes sense to me.  
+I don't see how this behavior is correct, as i can't seem to find a 
+way to list the contents of a folder with bracket's in the name.  
+using DirectoryInfo doesn't seem to help either, as you can see in 
+the example attached.