Skip to content
Snippets Groups Projects
Commit cda87fd9 authored by Owen Winkler's avatar Owen Winkler Committed by Thomas Müller
Browse files

Normalize lock exception messages.

parent e6712bc1
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ class OC_Connector_Sabre_Exception_FileLocked extends Sabre_DAV_Exception { ...@@ -11,7 +11,7 @@ class OC_Connector_Sabre_Exception_FileLocked extends Sabre_DAV_Exception {
public function __construct($message = "", $code = 0, Exception $previous = null) { public function __construct($message = "", $code = 0, Exception $previous = null) {
if($previous instanceof \OCP\Files\LockNotAcquiredException) { 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); parent::__construct($message, $code, $previous);
} }
......
...@@ -99,7 +99,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D ...@@ -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()); throw new Sabre_DAV_Exception_Forbidden($e->getMessage());
} catch (\OCP\Files\LockNotAcquiredException $e) { } catch (\OCP\Files\LockNotAcquiredException $e) {
// the file is currently being written to by another process // 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 // rename to correct path
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment