summaryrefslogtreecommitdiffstats
path: root/lib/private/helper.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-03-17 12:53:26 +0100
committerRobin Appelman <icewind@owncloud.com>2014-03-17 12:53:55 +0100
commit166dfbf58bd8944688c0941dfbca052a600faef1 (patch)
tree36757939c13100c79536df964535e63214b37c71 /lib/private/helper.php
parent518903c6eb865b7773e8953e5acb955551ad1674 (diff)
downloadnextcloud-server-166dfbf58bd8944688c0941dfbca052a600faef1.tar.gz
nextcloud-server-166dfbf58bd8944688c0941dfbca052a600faef1.zip
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 0b1a26bbecd..f0129f7c84d 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