Skip to content

Commit

Permalink
Backport 25367 to Stable 9.0 (#25384)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamken authored and DeepDiver1975 committed Jul 6, 2016
1 parent 445a76b commit 64a1519
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/files_versions/lib/storage.php
Expand Up @@ -634,7 +634,7 @@ protected static function getAutoExpireList($time, $versions) {
//distance between two version too small, mark to delete
$toDelete[$key] = $version['path'] . '.v' . $version['version'];
$size += $version['size'];
\OCP\Util::writeLog('files_versions', 'Mark to expire '. $version['path'] .' next version should be ' . $nextVersion . " or smaller. (prevTimestamp: " . $prevTimestamp . "; step: " . $step, \OCP\Util::DEBUG);
\OCP\Util::writeLog('files_versions', 'Mark to expire '. $version['path'] .' next version should be ' . $nextVersion . " or smaller. (prevTimestamp: " . $prevTimestamp . "; step: " . $step, \OCP\Util::INFO);
} else {
$nextVersion = $version['version'] - $step;
$prevTimestamp = $version['version'];
Expand Down Expand Up @@ -755,7 +755,7 @@ public static function expire($filename) {
self::deleteVersion($versionsFileview, $path);
\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $path, 'trigger' => self::DELETE_TRIGGER_QUOTA_EXCEEDED));
unset($allVersions[$key]); // update array with the versions we keep
\OCP\Util::writeLog('files_versions', "Expire: " . $path, \OCP\Util::DEBUG);
\OCP\Util::writeLog('files_versions', "Expire: " . $path, \OCP\Util::INFO);
}

// Check if enough space is available after versions are rearranged.
Expand All @@ -771,7 +771,7 @@ public static function expire($filename) {
\OC_Hook::emit('\OCP\Versions', 'preDelete', array('path' => $version['path'].'.v'.$version['version'], 'trigger' => self::DELETE_TRIGGER_QUOTA_EXCEEDED));
self::deleteVersion($versionsFileview, $version['path'] . '.v' . $version['version']);
\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $version['path'].'.v'.$version['version'], 'trigger' => self::DELETE_TRIGGER_QUOTA_EXCEEDED));
\OCP\Util::writeLog('files_versions', 'running out of space! Delete oldest version: ' . $version['path'].'.v'.$version['version'] , \OCP\Util::DEBUG);
\OCP\Util::writeLog('files_versions', 'running out of space! Delete oldest version: ' . $version['path'].'.v'.$version['version'] , \OCP\Util::INFO);
$versionsSize -= $version['size'];
$availableSpace += $version['size'];
next($allVersions);
Expand Down

0 comments on commit 64a1519

Please sign in to comment.