[Mono-bugs] [Bug 75989][Nor] New - Directory.GetFiles returns 0
elements on directories with symlinks.
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Sep 5 13:45:20 EDT 2005
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 miguel at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75989
--- shadow/75989 2005-09-05 13:45:20.000000000 -0400
+++ shadow/75989.tmp.17784 2005-09-05 13:45:20.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 75989
+Product: Mono: Runtime
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: io-layer
+AssignedTo: dick at ximian.com
+ReportedBy: miguel at ximian.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Directory.GetFiles returns 0 elements on directories with symlinks.
+
+1. Create an empty directory:
+
+ mkdir /tmp/tests
+
+2. Put symlinks in there
+ cd /tmp/tests
+ ln -s /etc/passwd .
+
+3. Run attached program, it prints zero:
+
+using System;
+using System.IO;
+
+class X {
+
+static void Main ()
+{
+ Console.WriteLine (Directory.GetFiles ("/tmp/tests").Length);
+}
+}
+
+It should print 1
+
+The question is whether we should follow links to determine the proper kind
+of link or not for FindFirst/FindNext
More information about the mono-bugs
mailing list