aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/file.php6
-rw-r--r--lib/private/files/filesystem.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 0f5a3315f8f..12ce633838f 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -64,7 +64,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
throw new \Sabre\DAV\Exception\ServiceUnavailable("Encryption is disabled");
}
- $fileName = basename($this->path);
+ $fileName = basename($this->info->getPath());
if (!\OCP\Util::isValidFileName($fileName)) {
throw new \Sabre\DAV\Exception\BadRequest();
}
@@ -74,8 +74,8 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
return $this->createFileChunked($data);
}
- list($storage, ) = $this->fileView->resolvePath($this->path);
- $needsPartFile = $this->needsPartFile($storage);
+ list($storage,) = $this->fileView->resolvePath($this->path);
+ $needsPartFile = $this->needsPartFile($storage) && (strlen($this->path) > 1);
if ($needsPartFile) {
// mark file as partial while uploading (ignored by the scanner)
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index c460159ece3..140d892652f 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -293,7 +293,7 @@ class Filesystem {
}
$mount = self::$mounts->find($path);
if ($mount) {
- return array($mount->getStorage(), $mount->getInternalPath($path));
+ return array($mount->getStorage(), rtrim($mount->getInternalPath($path), '/'));
} else {
return array(null, null);
}