-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "fix(performance): Do not set up filesystem on every call" #36788
Conversation
nickvergessen
commented
Feb 21, 2023
- Reverts fix(performance): Do not set up filesystem on every call #36589
- Details in Regression in filesystem handling breaks Talk/ attachment folder #36787
* @throws ServiceUnavailable | ||
*/ | ||
private function createFileChunked($data) { | ||
[$path, $name] = \Sabre\Uri\split($this->path); |
Check notice
Code scanning / Psalm
UndefinedFunction
|
||
if ($chunk_handler->isComplete()) { | ||
/** @var Storage $storage */ | ||
[$storage,] = $this->fileView->resolvePath($path); |
Check notice
Code scanning / Psalm
DeprecatedClass
if (isset($this->request->server['HTTP_OC_CHECKSUM'])) { | ||
$checksum = trim($this->request->server['HTTP_OC_CHECKSUM']); | ||
$this->fileView->putFileInfo($targetPath, ['checksum' => $checksum]); | ||
} elseif ($info->getChecksum() !== null && $info->getChecksum() !== '') { |
Check notice
Code scanning / Psalm
RedundantConditionGivenDocblockType
if (isset($this->request->server['HTTP_OC_CHECKSUM'])) { | ||
$checksum = trim($this->request->server['HTTP_OC_CHECKSUM']); | ||
$this->fileView->putFileInfo($targetPath, ['checksum' => $checksum]); | ||
} elseif ($info->getChecksum() !== null && $info->getChecksum() !== '') { |
Check notice
Code scanning / Psalm
PossiblyFalseReference
|
||
$this->fileView->unlockFile($targetPath, ILockingProvider::LOCK_SHARED); | ||
|
||
return $info->getEtag(); |
Check notice
Code scanning / Psalm
PossiblyFalseReference
* @throws \Sabre\DAV\Exception\BadRequest | ||
*/ | ||
public function sendFileIdHeader($filePath, \Sabre\DAV\INode $node = null) { | ||
// chunked upload handling | ||
if (isset($_SERVER['HTTP_OC_CHUNKED'])) { | ||
[$path, $name] = \Sabre\Uri\split($filePath); |
Check notice
Code scanning / Psalm
UndefinedFunction
private function resolveChunkFile($path) { | ||
if (isset($_SERVER['HTTP_OC_CHUNKED'])) { | ||
// resolve to real file name to find the proper node | ||
[$dir, $name] = \Sabre\Uri\split($path); |
Check notice
Code scanning / Psalm
UndefinedFunction
throw new InsufficientStorage("Insufficient space in $path, $length required, $freeSpace available"); | ||
} | ||
} | ||
return true; | ||
} | ||
|
||
public function getFileChunking($info) { |
Check notice
Code scanning / Psalm
MissingReturnType
throw new InsufficientStorage("Insufficient space in $path, $length required, $freeSpace available"); | ||
} | ||
} | ||
return true; | ||
} | ||
|
||
public function getFileChunking($info) { |
Check notice
Code scanning / Psalm
MissingParamType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😢