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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
10 + 3 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC