diff --git a/lib/private/connector/sabre/directory.php b/lib/private/connector/sabre/directory.php
index 82e1b55d763daa26d632e2d42c00b258681162c0..58f16a2bd04b72ded76e8a6d9b35080e75461245 100644
--- a/lib/private/connector/sabre/directory.php
+++ b/lib/private/connector/sabre/directory.php
@@ -104,6 +104,8 @@ class Directory extends \OC\Connector\Sabre\Node
 			return $node->put($data);
 		} catch (\OCP\Files\StorageNotAvailableException $e) {
 			throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
+		} catch (\OCP\Files\InvalidPathException $ex) {
+			throw new InvalidPath($ex->getMessage());
 		} catch (LockedException $e) {
 			throw new FileLocked($e->getMessage(), $e->getCode(), $e);
 		}