aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-08-04 17:41:03 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-08-04 17:41:03 +0200
commitf4c7e3c1e9b108f105b8b8a8901d29ec1fe475b4 (patch)
treebd5c74dc58afa21457bd15bbf0a6d9e1b9a3d82e /lib
parent5a833b3acd33b9a8ecfcff91397bdaca6791e49d (diff)
parentb04bab0ac75d68f8897b390dbf73654da56f8b72 (diff)
downloadnextcloud-server-f4c7e3c1e9b108f105b8b8a8901d29ec1fe475b4.tar.gz
nextcloud-server-f4c7e3c1e9b108f105b8b8a8901d29ec1fe475b4.zip
Merge pull request #10083 from th3fallen/fix-9969-take-two
Fix 9969
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/storage/local.php17
-rw-r--r--lib/private/files/storage/mappedlocal.php29
2 files changed, 9 insertions, 37 deletions
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index 63570d70cff..a8b420e978a 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -208,22 +208,7 @@ if (\OC_Util::runningOnWindows()) {
}
public function fopen($path, $mode) {
- if ($return = fopen($this->datadir . $path, $mode)) {
- switch ($mode) {
- case 'r':
- break;
- case 'r+':
- case 'w+':
- case 'x+':
- case 'a+':
- break;
- case 'w':
- case 'x':
- case 'a':
- break;
- }
- }
- return $return;
+ return fopen($this->datadir . $path, $mode);
}
public function hash($type, $path, $raw = false) {
diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php
index c4a8dc1961c..0760d842eaf 100644
--- a/lib/private/files/storage/mappedlocal.php
+++ b/lib/private/files/storage/mappedlocal.php
@@ -79,7 +79,7 @@ class MappedLocal extends \OC\Files\Storage\Common {
$logicalPath = $this->mapper->physicalToLogic($physicalPath);
$dh = opendir($physicalPath);
- if(is_resource($dh)) {
+ if (is_resource($dh)) {
while (($file = readdir($dh)) !== false) {
if ($file === '.' or $file === '..') {
continue;
@@ -87,9 +87,9 @@ class MappedLocal extends \OC\Files\Storage\Common {
$logicalFilePath = $this->mapper->physicalToLogic($physicalPath . '/' . $file);
- $file= $this->mapper->stripRootFolder($logicalFilePath, $logicalPath);
+ $file = $this->mapper->stripRootFolder($logicalFilePath, $logicalPath);
$file = $this->stripLeading($file);
- $files[]= $file;
+ $files[] = $file;
}
}
@@ -245,28 +245,15 @@ class MappedLocal extends \OC\Files\Storage\Common {
}
public function fopen($path, $mode) {
- if ($return = fopen($this->buildPath($path), $mode)) {
- switch ($mode) {
- case 'r':
- break;
- case 'r+':
- case 'w+':
- case 'x+':
- case 'a+':
- break;
- case 'w':
- case 'x':
- case 'a':
- break;
- }
- }
- return $return;
+ return fopen($this->buildPath($path), $mode);
}
/**
* @param string $dir
+ * @param bool $isLogicPath
+ * @return bool
*/
- private function delTree($dir, $isLogicPath=true) {
+ private function delTree($dir, $isLogicPath = true) {
$dirRelative = $dir;
if ($isLogicPath) {
$dir = $this->buildPath($dir);
@@ -380,7 +367,7 @@ class MappedLocal extends \OC\Files\Storage\Common {
/**
* @param string $path
*/
- private function cleanMapper($path, $isLogicPath = true, $recursive=true) {
+ private function cleanMapper($path, $isLogicPath = true, $recursive = true) {
$fullPath = $path;
if ($isLogicPath) {
$fullPath = $this->datadir . $path;