[Pkg-owncloud-commits] [owncloud] 212/457: phpdoc and minor issues
David Prévot
taffit at moszumanska.debian.org
Sun Jun 28 20:06:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 35c377f7a9a0413bea5fa6768467c6e5f7c2d83e
Author: Robin Appelman <icewind at owncloud.com>
Date: Wed May 13 13:37:18 2015 +0200
phpdoc and minor issues
---
lib/private/files/storage/storage.php | 4 ++--
lib/private/files/view.php | 26 +++++++++++++++++---------
lib/public/files/storage.php | 4 ++--
3 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/lib/private/files/storage/storage.php b/lib/private/files/storage/storage.php
index 8b34908..642544b 100644
--- a/lib/private/files/storage/storage.php
+++ b/lib/private/files/storage/storage.php
@@ -78,7 +78,7 @@ interface Storage extends \OCP\Files\Storage {
public function getMetaData($path);
/**
- * @param string $path
+ * @param string $path The path of the file to acquire the lock for
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
@@ -86,7 +86,7 @@ interface Storage extends \OCP\Files\Storage {
public function acquireLock($path, $type, ILockingProvider $provider);
/**
- * @param string $path
+ * @param string $path The path of the file to release the lock for
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
*/
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index b499bbb..b8bbd60 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -971,9 +971,9 @@ class View {
}
} catch (\Exception $e) {
if (in_array('write', $hooks) || in_array('delete', $hooks)) {
- $this->lockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
+ $this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
} else {
- $this->lockFile($path, ILockingProvider::LOCK_SHARED);
+ $this->unlockFile($path, ILockingProvider::LOCK_SHARED);
}
throw $e;
}
@@ -1638,6 +1638,10 @@ class View {
return $result;
}
+ /**
+ * @param string $path the path of the file to lock, relative to the view
+ * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
+ */
private function lockPath($path, $type) {
$mount = $this->getMount($path);
if ($mount) {
@@ -1651,6 +1655,10 @@ class View {
}
}
+ /**
+ * @param string $path the path of the file to unlock, relative to the view
+ * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
+ */
private function unlockPath($path, $type) {
$mount = $this->getMount($path);
if ($mount) {
@@ -1665,13 +1673,13 @@ class View {
}
/**
- * Lock a path and all it's parents
+ * Lock a path and all its parents up to the root of the view
*
- * @param string $path
- * @param int $type
+ * @param string $path the path of the file to lock relative to the view
+ * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
*/
public function lockFile($path, $type) {
- $path = rtrim($path, '/');
+ $path = '/' . trim($path, '/');
$this->lockPath($path, $type);
$parents = $this->getParents($path);
@@ -1681,10 +1689,10 @@ class View {
}
/**
- * Unlock a path and all it's parents
+ * Unlock a path and all its parents up to the root of the view
*
- * @param string $path
- * @param int $type
+ * @param string $path the path of the file to lock relative to the view
+ * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
*/
public function unlockFile($path, $type) {
$path = rtrim($path, '/');
diff --git a/lib/public/files/storage.php b/lib/public/files/storage.php
index ea1da57..68d00fa 100644
--- a/lib/public/files/storage.php
+++ b/lib/public/files/storage.php
@@ -416,7 +416,7 @@ interface Storage {
public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath);
/**
- * @param string $path
+ * @param string $path The path of the file to acquire the lock for
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
@@ -424,7 +424,7 @@ interface Storage {
public function acquireLock($path, $type, ILockingProvider $provider);
/**
- * @param string $path
+ * @param string $path The path of the file to acquire the lock for
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
*/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list