[Mono-bugs] [Bug 79887][Wis] Changed - DirectoryInfo doesn't honor symbolic links anymore
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sat Nov 11 09:17:55 EST 2006
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 alex.olk at googlemail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=79887
--- shadow/79887 2006-11-11 08:42:37.000000000 -0500
+++ shadow/79887.tmp.14722 2006-11-11 09:17:55.000000000 -0500
@@ -77,6 +77,46 @@
it is a file or directory link) with the .lnk extension.
But, a unix symbolic link is NO file. So, returning such a link as
FileSystemInfo doesn't make much sense. Just the name (or fullname) as
information is not useful at all.
+
+------- Additional Comments From alex.olk at googlemail.com 2006-11-11 09:17 -------
+Forgot to mention that when you call
+DirectoryInfo.GetFileSystemInfos() in a directory with ntfs hardlinks
+a hardlink to a directory is returned as FileSystemInfo with attribute
+ReparsePoint.
+
+But, and that is the difference to the current mono implementation,
+the hard linked directory is also returned as a dir when you call
+DirectoryInfo.GetDirectories.
+
+enhanced test case. please test it on windows and linux. On windows
+add a ntfs hardlink to a directory.
+
+using System;
+using System.IO;
+
+namespace Bug
+{
+ public class MyTest
+ {
+ public static void Main(string[] args)
+ {
+ // files
+ DirectoryInfo info = new DirectoryInfo(Environment.CurrentDirectory);
+ foreach (FileSystemInfo entry in info.GetFileSystemInfos()) {
+ Console.WriteLine(entry.FullName);
+ Console.WriteLine(entry.Attributes);
+ }
+
+ // directories
+ Console.WriteLine("------------");
+ DirectoryInfo[] dirs = info.GetDirectories ();
+
+ foreach (DirectoryInfo di in dirs)
+ Console.WriteLine(di.FullName);
+ }
+ }
+}
+
More information about the mono-bugs
mailing list