[Mono-bugs] [Bug 57224][Min] New - files that are invisible to DirectoryInfo.GetFiles("*")

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 19 Apr 2004 10:47:42 -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 michael@ivanic.id.au.

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

--- shadow/57224	2004-04-19 10:47:42.000000000 -0400
+++ shadow/57224.tmp.765	2004-04-19 10:47:42.000000000 -0400
@@ -0,0 +1,121 @@
+Bug#: 57224
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: Mandrake Linux 10.0 Community Edition
+Status: NEW   
+Resolution: 
+Severity: 002 Two hours
+Priority: Minor
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: michael@ivanic.id.au               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: files that are invisible to DirectoryInfo.GetFiles("*")
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+Hi. I have a short program that attempts to list all the files in a
+directory. Its actually part of a larger program that counts up all my mp3s
+and tells me which albums are incomplete, but I cut the relevant part out
+and made it standalone.
+
+It works perfectly unless there are punctuation characters in a file; these
+ files are then invisible. It also applies to characters from foreign
+alphabets, in particular English-like characters with diacritics on them.
+
+Steps to reproduce the problem:
+1. compile/run the following program :
+#start
+
+using System;
+using System.IO;
+public class DirectoryTest
+{
+	public static void Main(string[] args)
+	{
+		string startDirectory = "." + Path.DirectorySeparatorChar;
+		DirectoryInfo di = new DirectoryInfo(startDirectory);
+		foreach (FileInfo fileInfo in di.GetFiles("*"))
+		{
+			Console.WriteLine(fileInfo.Name);
+		}
+	}
+}
+
+#end
+
+ermm without the #start and #end
+2. Ran it in a few directories with mp3 files in them
+
+Actual Results:
+
+DirectoryText.exe
+playlist.m3u
+Track01of14 - Kill the Poor.mp3
+Track02of14 - Forward to Death.mp3
+Track03of14 - When Ya Get Drafted.mp3
+Track04of14 - Let's Lynch the Landlord.mp3
+Track05of14 - Drug Me.mp3
+Track06of14 - Your Emotions.mp3
+Track07of14 - Chemical Warfare.mp3
+Track09of14 - I Kill Children.mp3
+Track10of14 - Stealing People's Mail.mp3
+Track11of14 - Funland at the Beach.mp3
+Track12of14 - Ill in the Head.mp3
+Track13of14 - Holiday in Cambodia.mp3
+Track14of14 - Viva Las Vegas.mp3
+
+
+Expected Results:
+
+In the directory "/home/michael/mp3s/Punk and Ska/Dead Kennedys/1979Fresh
+Fruit for Rotting Vegetables"
+ls produces the result : 
+
+DirectoryText.exe
+playlist.m3u
+Track01of14 - Kill the Poor.mp3
+Track02of14 - Forward to Death.mp3
+Track03of14 - When Ya Get Drafted.mp3
+Track04of14 - Let's Lynch the Landlord.mp3
+Track05of14 - Drug Me.mp3
+Track06of14 - Your Emotions.mp3
+Track07of14 - Chemical Warfare.mp3
+Track08of14 - California Über Alles.mp3
+Track09of14 - I Kill Children.mp3
+Track10of14 - Stealing People's Mail.mp3
+Track11of14 - Funland at the Beach.mp3
+Track12of14 - Ill in the Head.mp3
+Track13of14 - Holiday in Cambodia.mp3
+Track14of14 - Viva Las Vegas.mp3
+
+As you can see, "Track08of14 - California Über Alles.mp3" isn't visible.
+
+How often does this happen? 
+
+I've tried it on several directories, all the same result for similar such
+filenames. Other examples include "Track08of14 - K@#Ø%!.mp3" by Korn and
+"Track02of07 - Det Svartner Nå.mp3" by DarkThrone. Presumably it's the same
+for files other than mp3s ...
+
+Additional Information:
+
+I can read all the files using XMMS, and I can also execute the same code
+using WinXP, my machine is dual boot. The WinXP .NET virtual machine lists
+all files as expected. I've tried it using both the DirectoryInfo class and
+plain old Directory.GetFiles(). My file system is ReiserFS, though that
+shouldn't matter.
+
+I'm using mono-0.31, and the compilation is just mcs, no switches. The
+running is also without switches.
+
+Thanks for your help with this, hope its not just some stupid bug of mine :)
+
+Regards,
+Michael