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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=81669 --- shadow/81669 2007-05-18 08:13:01.000000000 -0400 +++ shadow/81669.tmp.17742 2007-05-18 08:20:05.000000000 -0400 @@ -1,22 +1,21 @@ Bug#: 81669 Product: Mono: Class Libraries Version: 1.2 OS: unknown OS Details: XP SP2 -Status: NEW +Status: NEEDINFO Resolution: Severity: Unknown Priority: Wishlist Component: Sys.Drawing. AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] TargetMilestone: --- URL: -Cc: Summary: Icon..ctor(String filename) needs Write access to the file Icon..ctor(String filename) needs Write access to the file Mono 1.2.4. (installer). Tested only on Windows XP SP2, where it always occurs. @@ -50,6 +49,38 @@ ------- Additional Comments From [EMAIL PROTECTED] 2007-05-18 08:09 ------- Can you attach the icon that you are using? ------- Additional Comments From [EMAIL PROTECTED] 2007-05-18 08:13 ------- Looks like it happens with any icon, forget about attach icon :) + +------- Additional Comments From [EMAIL PROTECTED] 2007-05-18 08:20 ------- +Thanks! +Icon.cs fixed in SVN r77632. + +c.c. Igor for Icon2.jvm.cs + +c.c. Toshok for cursor (patch inline) + +note: we can dispose the stream (hence the using pattern) because the +stream will not be used, under win32, by MS GDI+. + + +Index: System.Windows.Forms/Cursor.cs +=================================================================== +--- System.Windows.Forms/Cursor.cs (revision 77551) ++++ System.Windows.Forms/Cursor.cs (working copy) +@@ -144,7 +144,11 @@ + CreateCursor(stream); + } + +- public Cursor(string fileName) : this (new FileStream +(fileName, FileMode.Open)) { ++ public Cursor (string fileName) ++ { ++ using (FileStream fs = File.Open (fileName)) { ++ CreateCursor (fs); ++ } + } + + public Cursor(Type type, string resource) { + _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
