https://bugzilla.novell.com/show_bug.cgi?id=383905
Summary: Passing invalid filename chars to System.IO.FileInfo() yields different results in .NET vs. MonoWindows Product: Mono: Class Libraries Version: 1.9.0 Platform: x86 OS/Version: Windows XP Status: NEW Severity: Normal Priority: P5 - None Component: CORLIB AssignedTo: mono-bugs@lists.ximian.com ReportedBy: [EMAIL PROTECTED] QAContact: mono-bugs@lists.ximian.com Found By: --- :, *, and ? are illegal in .NET on WinXP, while they are allowed in Mono on WinXP. Also the exception messages are different. This test was performed on the same machine and OS: namespace FileInfoTest { class Program { static void Main(string[] args) { foreach (char illegalChar in System.IO.Path.GetInvalidFileNameChars()) { try { string path = illegalChar.ToString(); Console.Write(path + ": "); System.IO.FileInfo dir = new System.IO.FileInfo(illegalChar.ToString()); Console.WriteLine("No exception thrown!"); } catch (ArgumentException ex) { Console.WriteLine(ex.GetType() + ": " + ex.Message); } } Console.Read(); } } } Expected: ": System.ArgumentException: Illegal characters in path. <: System.ArgumentException: Illegal characters in path. >: System.ArgumentException: Illegal characters in path. |: System.ArgumentException: Illegal characters in path. : System.ArgumentException: Illegal characters in path. ☺: System.ArgumentException: Illegal characters in path. ☻: System.ArgumentException: Illegal characters in path. ♥: System.ArgumentException: Illegal characters in path. ♦: System.ArgumentException: Illegal characters in path. ♣: System.ArgumentException: Illegal characters in path. ♠: System.ArgumentException: Illegal characters in path. : System.ArgumentException: Illegal characters in path. : System.ArgumentException: Illegal characters in path. : System.ArgumentException: The path is not of a legal form. : System.ArgumentException: The path is not of a legal form. ♂: System.ArgumentException: The path is not of a legal form. ♀: System.ArgumentException: The path is not of a legal form. : System.ArgumentException: The path is not of a legal form. ♫: System.ArgumentException: Illegal characters in path. ☼: System.ArgumentException: Illegal characters in path. ►: System.ArgumentException: Illegal characters in path. ◄: System.ArgumentException: Illegal characters in path. ↕: System.ArgumentException: Illegal characters in path. ‼: System.ArgumentException: Illegal characters in path. ¶: System.ArgumentException: Illegal characters in path. §: System.ArgumentException: Illegal characters in path. ▬: System.ArgumentException: Illegal characters in path. ↨: System.ArgumentException: Illegal characters in path. ↑: System.ArgumentException: Illegal characters in path. ↓: System.ArgumentException: Illegal characters in path. →: System.ArgumentException: Illegal characters in path. ←: System.ArgumentException: Illegal characters in path. ∟: System.ArgumentException: Illegal characters in path. ↔: System.ArgumentException: Illegal characters in path. ▲: System.ArgumentException: Illegal characters in path. ▼: System.ArgumentException: Illegal characters in path. :: System.ArgumentException: The path is not of a legal form. *: System.ArgumentException: Illegal characters in path. ?: System.ArgumentException: Illegal characters in path. \: No exception thrown! /: No exception thrown! Actual: : System.ArgumentException: path Parameter name: Invalid characters in path. ☺: System.ArgumentException: path Parameter name: Invalid characters in path. ☻: System.ArgumentException: path Parameter name: Invalid characters in path. ♥: System.ArgumentException: path Parameter name: Invalid characters in path. ♦: System.ArgumentException: path Parameter name: Invalid characters in path. ♣: System.ArgumentException: path Parameter name: Invalid characters in path. ♠: System.ArgumentException: path Parameter name: Invalid characters in path. : System.ArgumentException: path Parameter name: Invalid characters in path. : System.ArgumentException: path Parameter name: Invalid characters in path. : System.ArgumentException: path Parameter name: Invalid characters in path. : System.ArgumentException: path Parameter name: Invalid characters in path. ♂: System.ArgumentException: path Parameter name: Invalid characters in path. ♀: System.ArgumentException: path Parameter name: Invalid characters in path. : System.ArgumentException: path Parameter name: Invalid characters in path. ♫: System.ArgumentException: path Parameter name: Invalid characters in path. ☼: System.ArgumentException: path Parameter name: Invalid characters in path. ►: System.ArgumentException: path Parameter name: Invalid characters in path. ◄: System.ArgumentException: path Parameter name: Invalid characters in path. ↕: System.ArgumentException: path Parameter name: Invalid characters in path. ‼: System.ArgumentException: path Parameter name: Invalid characters in path. ¶: System.ArgumentException: path Parameter name: Invalid characters in path. §: System.ArgumentException: path Parameter name: Invalid characters in path. ▬: System.ArgumentException: path Parameter name: Invalid characters in path. ↨: System.ArgumentException: path Parameter name: Invalid characters in path. ↑: System.ArgumentException: path Parameter name: Invalid characters in path. ↓: System.ArgumentException: path Parameter name: Invalid characters in path. →: System.ArgumentException: path Parameter name: Invalid characters in path. ←: System.ArgumentException: path Parameter name: Invalid characters in path. ∟: System.ArgumentException: path Parameter name: Invalid characters in path. ↔: System.ArgumentException: path Parameter name: Invalid characters in path. ▲: System.ArgumentException: path Parameter name: Invalid characters in path. ▼: System.ArgumentException: path Parameter name: Invalid characters in path. ": System.ArgumentException: path Parameter name: Invalid characters in path. <: System.ArgumentException: path Parameter name: Invalid characters in path. >: System.ArgumentException: path Parameter name: Invalid characters in path. |: System.ArgumentException: path Parameter name: Invalid characters in path. :: No exception thrown! *: No exception thrown! ?: No exception thrown! \: No exception thrown! /: No exception thrown! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs