https://bugzilla.novell.com/show_bug.cgi?id=377049


           Summary: When the file is locked File.Move moves instead of
                    throwing IOException
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Core
        AssignedTo: mono-bugs@lists.ximian.com
        ReportedBy: [EMAIL PROTECTED]
         QAContact: mono-bugs@lists.ximian.com
          Found By: ---


[Test]
[ExpectedException(typeof(IOException))]
public void FileLocks()
{
  string temporaryFile = Path.GetTempFileName();
  string temporaryFile1 = Path.Combine(Path.GetTempPath(),
                                       Path.GetRandomFileName());

  using (File.Open(temporaryFile, 
                   FileMode.Open, 
                   FileAccess.ReadWrite, 
                   FileShare.None))
  {
      File.Move(temporaryFile, temporaryFile1);
  }

}


-- 
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

Reply via email to