[Mono-bugs] [Bug 79250][Wis] Changed - FileShare.Delete not accepted by System.IO.FileStream ctor

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jun 22 15:45:05 EDT 2007


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 robajz-public at robajz.info.

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

--- shadow/79250	2007-06-21 12:49:13.000000000 -0400
+++ shadow/79250.tmp.24158	2007-06-22 15:45:05.000000000 -0400
@@ -10,12 +10,13 @@
 Component: CORLIB
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: ladislav.prosek at matfyz.cz               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
+Cc: peter.dettman at iinet.net.au,robajz-public at robajz.info
 Summary: FileShare.Delete not accepted by System.IO.FileStream ctor
 
 Please fill in this template when reporting a bug, unless you know what you
 are doing.
 Description of Problem:
 
@@ -83,6 +84,26 @@
 I think the good test should be:
 if (share < FileShare.None || share > FileShare.Delete |
 FileShare.ReadWrite)
 
 ------- Additional Comments From dick at ximian.com  2007-06-21 12:49 -------
 Updated test committed to svn.  Thanks.
+
+------- Additional Comments From robajz-public at robajz.info  2007-06-22 15:45 -------
+//Hi there,
+
+//wouldn't it be better to test with ^&?
+
+int possibleShare = FileShare.Read | FileShare.Write |
+FileShare.Delete | FileShare.ReadWrite | whatever;
+
+if(share ^ (share & possibleShare)) throw the exception;
+
+//same as
+
+if(share != (share & possibleShare)) throw the exception;
+
+//I don't know which is more efficient.
+
+//When can I expect the fix available in snapshots|installer?
+
+//Regards, Robert.


More information about the mono-bugs mailing list