Skip to content
Snippets Groups Projects
Commit b04c7175 authored by Bart Visscher's avatar Bart Visscher
Browse files

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

This didn't work with chunked uploading
parent ce10e1c1
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment