[Pkg-owncloud-commits] [owncloud] 07/46: throw exception in writeBack, the returned boolean is checked nowhere

David Prévot taffit at moszumanska.debian.org
Fri Oct 24 15:11:40 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 61873e4e218c4dcde8bb13d35c0bfec8a94267ed
Author: Jörn Friedrich Dreyer <jfd at butonic.de>
Date:   Wed Oct 8 18:02:42 2014 +0200

    throw exception in writeBack, the returned boolean is checked nowhere
---
 lib/private/files/objectstore/objectstorestorage.php | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/private/files/objectstore/objectstorestorage.php b/lib/private/files/objectstore/objectstorestorage.php
index 241864b..ae8bff5 100644
--- a/lib/private/files/objectstore/objectstorestorage.php
+++ b/lib/private/files/objectstore/objectstorestorage.php
@@ -349,7 +349,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
 
 	public function writeBack($tmpFile) {
 		if (!isset(self::$tmpFiles[$tmpFile])) {
-			return false;
+			return;
 		}
 
 		$path = self::$tmpFiles[$tmpFile];
@@ -375,9 +375,8 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
 		} catch (\Exception $ex) {
 			$this->getCache()->remove($path);
 			\OCP\Util::writeLog('objectstore', 'Could not create object: ' . $ex->getMessage(), \OCP\Util::ERROR);
-			return false;
+			throw $ex; // make this bubble up
 		}
-		return true;
 	}
 
 	/**

-- 
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