summaryrefslogtreecommitdiffstats
path: root/lib/files/storage/mappedlocal.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/files/storage/mappedlocal.php')
-rw-r--r--lib/files/storage/mappedlocal.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/files/storage/mappedlocal.php b/lib/files/storage/mappedlocal.php
index 434c10bcbf7..ba3fcdc5c9e 100644
--- a/lib/files/storage/mappedlocal.php
+++ b/lib/files/storage/mappedlocal.php
@@ -50,7 +50,7 @@ class MappedLocal extends \OC\Files\Storage\Common{
continue;
}
- $logicalFilePath = $this->mapper->physicalToLogic($physicalPath.DIRECTORY_SEPARATOR.$file);
+ $logicalFilePath = $this->mapper->physicalToLogic($physicalPath.'/'.$file);
$file= $this->mapper->stripRootFolder($logicalFilePath, $logicalPath);
$file = $this->stripLeading($file);
@@ -130,7 +130,7 @@ class MappedLocal extends \OC\Files\Storage\Common{
public function file_get_contents($path) {
return file_get_contents($this->buildPath($path));
}
- public function file_put_contents($path, $data) {//trigger_error("$path = ".var_export($path, 1));
+ public function file_put_contents($path, $data) {
return file_put_contents($this->buildPath($path), $data);
}
public function unlink($path) {
@@ -280,7 +280,7 @@ class MappedLocal extends \OC\Files\Storage\Common{
foreach (scandir($physicalDir) as $item) {
if ($item == '.' || $item == '..')
continue;
- $physicalItem = $this->mapper->physicalToLogic($physicalDir.DIRECTORY_SEPARATOR.$item);
+ $physicalItem = $this->mapper->physicalToLogic($physicalDir.'/'.$item);
$item = substr($physicalItem, strlen($physicalDir)+1);
if(strstr(strtolower($item), strtolower($query)) !== false) {
@@ -331,6 +331,9 @@ class MappedLocal extends \OC\Files\Storage\Common{
if(strpos($path, '/') === 0) {
$path = substr($path, 1);
}
+ if(strpos($path, '\\') === 0) {
+ $path = substr($path, 1);
+ }
if ($path === false) {
return '';
}