From cda87fd9c4e9d60bb20a9e4b80db5951dccc00e2 Mon Sep 17 00:00:00 2001
From: ringmaster <epithet@gmail.com>
Date: Fri, 30 May 2014 08:10:48 -0400
Subject: [PATCH] Normalize lock exception messages.

---
 lib/private/connector/sabre/exception/filelocked.php | 2 +-
 lib/private/connector/sabre/file.php                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/private/connector/sabre/exception/filelocked.php b/lib/private/connector/sabre/exception/filelocked.php
index 4bad936bd9f..ec200f847e3 100644
--- a/lib/private/connector/sabre/exception/filelocked.php
+++ b/lib/private/connector/sabre/exception/filelocked.php
@@ -11,7 +11,7 @@ class OC_Connector_Sabre_Exception_FileLocked extends Sabre_DAV_Exception {
 
 	public function __construct($message = "", $code = 0, Exception $previous = null) {
 		if($previous instanceof \OCP\Files\LockNotAcquiredException) {
-			$message = sprintf('Target file %s is locked by another process. %s', $previous->path, $previous->getMessage());
+			$message = sprintf('Target file %s is locked by another process.', $previous->path);
 		}
 		parent::__construct($message, $code, $previous);
 	}
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index fc57c82624e..48287b1e503 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -99,7 +99,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
 			throw new Sabre_DAV_Exception_Forbidden($e->getMessage());
 		} catch (\OCP\Files\LockNotAcquiredException $e) {
 			// the file is currently being written to by another process
-			throw new OC_Connector_Sabre_Exception_FileLocked(sprintf('Target file %s is locked by another process. %s', $e->path, $e->getMessage()), $e->getCode(), $e);
+			throw new OC_Connector_Sabre_Exception_FileLocked($e->getMessage(), $e->getCode(), $e);
 		}
 
 		// rename to correct path
-- 
GitLab