ソースを参照

Check if the versioned file exists before trying to do the versioning

This didn't work with chunked uploading
tags/v4.5.0beta4
Bart Visscher 11年前
コミット
b04c7175dc
1個のファイルの変更6行の追加0行の削除
  1. 6
    0
      apps/files_versions/lib/versions.php

+ 6
- 0
apps/files_versions/lib/versions.php ファイルの表示

@@ -77,6 +77,7 @@ class Storage {
$versionsFolderName=\OCP\Config::getSystemValue('datadirectory') . $this->view->getAbsolutePath('');

//check if source file already exist as version to avoid recursions.
// todo does this check work?
if ($users_view->file_exists($filename)) {
return false;
}
@@ -96,6 +97,11 @@ class Storage {
}
}

// we should have a source file to work with
if (!$files_view->file_exists($filename)) {
return false;
}

// check filesize
if($files_view->filesize($filename)>\OCP\Config::getSystemValue('files_versionsmaxfilesize', Storage::DEFAULTMAXFILESIZE)) {
return false;

読み込み中…
キャンセル
保存