Merge pull request #284 from nextcloud/cleanup-after-sync

we don't need to check permissions twice
This commit is contained in:
Morris Jobke 2016-07-04 12:23:41 +02:00 committed by GitHub
commit 2f475a9f1e

View file

@ -313,6 +313,7 @@ class Storage {
*
* @param string $file file name
* @param int $revision revision timestamp
* @return bool
*/
public static function rollback($file, $revision) {
@ -323,13 +324,10 @@ class Storage {
if ($uid === null || trim($filename, '/') === '') {
return false;
}
$users_view = new View('/'.$uid);
$files_view = new View('/'. User::getUser().'/files');
if (!$files_view->isUpdatable($filename)) {
return false;
}
$versionCreated = false;
$fileInfo = $files_view->getFileInfo($file);