diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-29 10:29:48 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-03-01 11:37:16 +0100 |
commit | ac392457f24aed34dc2c5635d9ffd64ec256b061 (patch) | |
tree | bd77ec67a8cc922757cdc302b4e6b2b72e261939 /apps/dav | |
parent | ec140fa2ec2aaf489bae728971ec18e58719a38a (diff) | |
download | nextcloud-server-ac392457f24aed34dc2c5635d9ffd64ec256b061.tar.gz nextcloud-server-ac392457f24aed34dc2c5635d9ffd64ec256b061.zip |
Fix unit tests
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/connector/sabre/file.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/dav/lib/connector/sabre/file.php b/apps/dav/lib/connector/sabre/file.php index b71c4ccc621..0bf7d9cf2bc 100644 --- a/apps/dav/lib/connector/sabre/file.php +++ b/apps/dav/lib/connector/sabre/file.php @@ -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); |