while loop not needed because of recursive call of put()
This commit is contained in:
parent
dc927bd346
commit
0bf2a3e6d6
|
@ -77,15 +77,11 @@ class OC_FileCache{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// add parent directories to the file cache if they does not exist yet.
|
// add parent directory to the file cache if it does not exist yet.
|
||||||
if ($parent == -1 && $fullpath != $root) {
|
if ($parent == -1 && $fullpath != $root) {
|
||||||
$dirparts = explode(DIRECTORY_SEPARATOR, dirname($path));
|
$parentDir = substr(dirname($path), 0, strrpos(dirname($path), DIRECTORY_SEPARATOR));
|
||||||
$part = '';
|
self::scanFile($parentDir);
|
||||||
while ($parent == -1) {
|
$parent = self::getParentId($fullpath);
|
||||||
self::scanFile( DIRECTORY_SEPARATOR.$part);
|
|
||||||
$parent = self::getParentId($fullpath);
|
|
||||||
$part = array_shift($dirparts);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isset($data['size']) or !isset($data['mtime'])){//save incomplete data for the next time we write it
|
if(!isset($data['size']) or !isset($data['mtime'])){//save incomplete data for the next time we write it
|
||||||
|
|
Loading…
Reference in New Issue