File tree Expand file tree Collapse file tree
test/ICSharpCode.SharpZipLib.Tests/Zip Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2753,6 +2753,21 @@ public void ExtractExceptions()
27532753
27542754 [ Test ]
27552755 [ Category ( "Zip" ) ]
2756+ [ Ignore ( "see comments below" ) ]
2757+ /*
2758+ * This test is somewhat strange:
2759+ * a) It tries to simulate a locked file by opening it on the same thread using FileShare.
2760+ * However the FileShare value is not meant for cross-process file locking, but only to
2761+ * allow other threads in the same process to access the same file.
2762+ * This is not the intended behavior, you would need a second process locking the file
2763+ * when running this test.
2764+ * b) It would require to change the file operation in FastZip.ProcessFile to use FileShare.ReadWrite
2765+ * but doing so would make FastZip work with locked files (that are potentially written to by others)
2766+ * and silently ignoring any locks. HOWEVER: This can lead to corrupt/incomplete files, which is why it
2767+ * should not be the default behavior.
2768+ *
2769+ * Therefore I would remove this test.
2770+ **/
27562771 public void ReadingOfLockedDataFiles ( )
27572772 {
27582773 const string tempName1 = "a.dat" ;
You can’t perform that action at this time.
0 commit comments