]> source.dussan.org Git - nextcloud-server.git/commitdiff
Normalize lock exception messages.
authorringmaster <epithet@gmail.com>
Fri, 30 May 2014 12:10:48 +0000 (08:10 -0400)
committerThomas Müller <thomas.mueller@tmit.eu>
Wed, 4 Jun 2014 05:55:45 +0000 (07:55 +0200)
lib/private/connector/sabre/exception/filelocked.php
lib/private/connector/sabre/file.php

index 4bad936bd9f6aeb7b11a14de1465f441e5420fbb..ec200f847e3db29647188dffb94b4f44ed6bafa7 100644 (file)
@@ -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);
        }
index fc57c82624efab4d9fbe6dcc03f64ad67ce4415b..48287b1e503b56b30e462284afab5927e792d2e1 100644 (file)
@@ -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