Skip to content
Snippets Groups Projects
Commit ac392457 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by Vincent Petry
Browse files

Fix unit tests

parent ec140fa2
No related branches found
No related tags found
No related merge requests found
......@@ -215,6 +215,8 @@ class File extends Node implements IFile {
}
}
$this->refreshInfo();
if (isset($request->server['HTTP_OC_CHECKSUM'])) {
$checksum = trim($request->server['HTTP_OC_CHECKSUM']);
$this->fileView->putFileInfo($this->path, ['checksum' => $checksum]);
......@@ -457,17 +459,17 @@ class File extends Node implements IFile {
$this->fileView->changeLock($targetPath, ILockingProvider::LOCK_SHARED);
$this->emitPostHooks($exists, $targetPath);
$info = $this->fileView->getFileInfo($targetPath);
if (isset($request->server['HTTP_OC_CHECKSUM'])) {
$checksum = trim($request->server['HTTP_OC_CHECKSUM']);
$this->fileView->putFileInfo($targetPath, ['checksum' => $checksum]);
} else if ($this->getChecksum() !== NULL && $this->getChecksum() !== '') {
} else if ($info->getChecksum() !== NULL && $info->getChecksum() !== '') {
$this->fileView->putFileInfo($this->path, ['checksum' => '']);
}
$this->refreshInfo();
$this->emitPostHooks($exists, $targetPath);
$info = $this->fileView->getFileInfo($targetPath);
$this->fileView->unlockFile($targetPath, ILockingProvider::LOCK_SHARED);
......
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