fix for infinite loop causing on files_encryption branch when testing "apps/files_encryption/test/crypt.php" on Method testSymmetricStreamEncryptShortFileContent

This commit is contained in:
Florin Peter 2013-04-29 15:43:48 +02:00
parent a5c72f1ad2
commit f55aaad858
2 changed files with 2 additions and 2 deletions

View File

@ -430,7 +430,7 @@ class Cache {
$this->calculateFolderSize($path); $this->calculateFolderSize($path);
if ($path !== '') { if ($path !== '') {
$parent = dirname($path); $parent = dirname($path);
if ($parent === '.') { if ($parent === '.' or $parent === '/') {
$parent = ''; $parent = '';
} }
$this->correctFolderSize($parent); $this->correctFolderSize($parent);

View File

@ -68,7 +68,7 @@ class Scanner {
if ($data) { if ($data) {
if ($file) { if ($file) {
$parent = dirname($file); $parent = dirname($file);
if ($parent === '.') { if ($parent === '.' or $parent === '/') {
$parent = ''; $parent = '';
} }
if (!$this->cache->inCache($parent)) { if (!$this->cache->inCache($parent)) {