Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoricewind1991 <robin@icewind.nl>2014-03-17 18:52:44 +0400
committericewind1991 <robin@icewind.nl>2014-03-17 18:52:44 +0400
commit6fbf3dd7c4e64a68d2b8a0a2c24a1b92de7868b1 (patch)
tree4a1963af45b76099c648f335bbc70cbc34276d60 /lib/private/helper.php
parent5c72b526a39647ee5c852793002ad14efbf13ca1 (diff)
parent166dfbf58bd8944688c0941dfbca052a600faef1 (diff)
Merge pull request #7764 from owncloud/datadir-chmod
use a non-recursive chmod on the datadir
Diffstat (limited to 'lib/private/helper.php')
-rw-r--r--lib/private/helper.php29
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php
index 807fa849637..98a86388d20 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -344,35 +344,6 @@ class OC_Helper {
}
/**
- * @brief Recursive editing of file permissions
- * @param string $path path to file or folder
- * @param int $filemode unix style file permissions
- * @return bool
- */
- static function chmodr($path, $filemode) {
- if (!is_dir($path))
- return chmod($path, $filemode);
- $dh = opendir($path);
- if(is_resource($dh)) {
- while (($file = readdir($dh)) !== false) {
- if ($file != '.' && $file != '..') {
- $fullpath = $path . '/' . $file;
- if (is_link($fullpath))
- return false;
- elseif (!is_dir($fullpath) && !@chmod($fullpath, $filemode))
- return false; elseif (!self::chmodr($fullpath, $filemode))
- return false;
- }
- }
- closedir($dh);
- }
- if (@chmod($path, $filemode))
- return true;
- else
- return false;
- }
-
- /**
* @brief Recursive copying of folders
* @param string $src source folder
* @param string $dest target folder