[Pkg-owncloud-commits] [owncloud] 05/131: Only delete part file on error if it is really a part file

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 15:58:24 UTC 2015


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

taffit pushed a commit to annotated tag v8.1.1
in repository owncloud.

commit 4aa2eff94c2fefa20fe4b26b6677074ee129ca50
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Wed Jul 1 12:52:06 2015 +0200

    Only delete part file on error if it is really a part file
---
 lib/private/connector/sabre/file.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index c28ac58..e4f53a2 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -146,7 +146,9 @@ class File extends Node implements IFile {
 			}
 
 		} catch (\Exception $e) {
-			$partStorage->unlink($internalPartPath);
+			if ($needsPartFile) {
+				$partStorage->unlink($internalPartPath);
+			}
 			$this->convertToSabreException($e);
 		}
 
@@ -176,7 +178,9 @@ class File extends Node implements IFile {
 			try {
 				$this->fileView->changeLock($this->path, ILockingProvider::LOCK_EXCLUSIVE);
 			} catch (LockedException $e) {
-				$partStorage->unlink($internalPartPath);
+				if ($needsPartFile) {
+					$partStorage->unlink($internalPartPath);
+				}
 				throw new FileLocked($e->getMessage(), $e->getCode(), $e);
 			}
 

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