The fact that delete_expired() and delete_flushed() functions call chdir(), then the all() method causes lots of errors. Indeed the all() method also use chdir(), but the current PHP directory is already the cache directory.

That's why the list of files inside the cache directory is correct and everything seems to be OK, except that several errors are thrown by the chdir().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

B-Prod’s picture

Status: Active » Needs review
FileSize
2.68 KB

The patch below fixes issue above.

The code inside delete_expired() method was also factorized to be reused in delete_flushed() method.

The only change is the < (lower than) operator that is used inside delete_flushed() method instead of <= (lower or equal), but it should not have any consequences in this case.

B-Prod’s picture

Some news about this? The bug is still alive!

  • ogi committed 11a907e on 7.x-1.x authored by B-Prod
    Issue #1778468 by B-Prod: recursive calls to chdir causes errors
    
ogi’s picture

Issue summary: View changes
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.