Development

#2294 (sfFileCache::clean() when dir does not exist)

You must first sign up to be able to contribute.

Ticket #2294 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

sfFileCache::clean() when dir does not exist

Reported by: lsmith Assigned to: fabien
Priority: minor Milestone: 1.0.8
Component: cache Version: 1.0.7
Keywords: Cc:
Qualification: Unreviewed

Description

Before calling cleanDir() there should be a check if the dir actually exists. Alternatively this check should be done inside cleanDir(). I have run into this issue when cleaning the cache when using i18n and when I have not yet called the interface with all languages.

public function clean($namespace = null, $mode = 'all') {

$namespace = str_replace('/', DIRECTORY_SEPARATOR, $namespace);

$dir = $this->cacheDir.DIRECTORY_SEPARATOR.$namespace; if (!file_exists($dir)) {

return true;

} return $this->cleanDir($dir, $mode);

}

Change History

09/29/07 08:50:12 changed by fabien

  • milestone set to 1.0.8.

09/29/07 08:52:08 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

in r5308