php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54987 rmdir() does not clear statcache
Submitted: 2011-06-03 17:29 UTC Modified: 2015-06-14 22:20 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: davey at marshallx dot fsnet dot co dot uk Assigned: cmb (profile)
Status: Closed Package: Directory function related
PHP Version: 5.3.6 OS: Windows 7 Pro 32-bit
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: davey at marshallx dot fsnet dot co dot uk
New email:
PHP Version: OS:

 

 [2011-06-03 17:29 UTC] davey at marshallx dot fsnet dot co dot uk
Description:
------------
See bug 43137. The same bug applies to Windows.

Given a directory structure "C:\Test\Test2" with no files in either directory,
rmdir("C:\Test\Test2") succeeds
but subsequent
rmdir("C:\Test") fails with "directory not empty", even though it is empty.
Running clearstatcache() prior to rmdir("C:\Test") works around the problem.

Test script:
---------------
if (file_exists("C:\Test\Test2")) rmdir("C:\Test\Test2");
rmdir("C:\Test")

Expected result:
----------------
c:\Test\Test2 is deleted
C:\Test is deleted
No warnings

Actual result:
--------------
C:\Test\Test2 is deleted
C:\Test is NOT deleted
Receive warning that C:\Test is not empty

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-14 22:20 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2015-06-14 22:20 UTC] cmb@php.net
Thank you for your bug report. This bug has been fixed in the
meantime (at least as of PHP 5.4.4).
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Apr 12 17:01:24 2021 UTC