[Mono-bugs] [Bug 582667] New: DirectoryInfo's property exists doesn't get updated when folder is deleted.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Feb 24 08:17:13 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=582667

http://bugzilla.novell.com/show_bug.cgi?id=582667#c0


           Summary: DirectoryInfo's property exists doesn't get updated
                    when folder is deleted.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: nestalk at googlemail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.6)
Gecko/20091201 SUSE/3.5.6-1.1.1 Firefox/3.5.6

If I create a DirectoryInfo object pointing to a folder, then delete that
folder and call the Refresh() method the Exists property still returns true.

If I do it in reverse, e.g. create the object and then create the folder on the
filesystem and call Refresh(), the property Exists will return the correct
value.


Reproducible: Always

Steps to Reproduce:
Run the following commands in the interactive shell or compile them:

using System.IO;
Directory.CreateDirectory("/tmp/test");
DirectoryInfo test = new DirectoryInfo("/tmp/test");
var result1 = test.Exists;
Directory.Delete("/tmp/test");
test.Refresh();
var result2 = test.Exists;

Actual Results:  
Both variables result1 and result2 are true.

Expected Results:  
result1 should be true and result2 should be false;

-- 
Configure bugmail: http://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.


More information about the mono-bugs mailing list