aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files/filesystem.php
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-05-27 11:35:57 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2013-05-27 11:35:57 -0400
commit16925672e885071afab1fe158dc206ab8ed93baf (patch)
tree143f64c88d7d47cb0f5a3a7641228a7cae24821b /lib/files/filesystem.php
parent0953b68556152187ed305323b64b186cc21c2ade (diff)
parent0c621ff6a93fe1b34c77257d83fd344489f59bab (diff)
downloadnextcloud-server-16925672e885071afab1fe158dc206ab8ed93baf.tar.gz
nextcloud-server-16925672e885071afab1fe158dc206ab8ed93baf.zip
Merge branch 'master' into googledrive
Diffstat (limited to 'lib/files/filesystem.php')
-rw-r--r--lib/files/filesystem.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index eadd8a93faf..b10625e20de 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -222,7 +222,10 @@ class Filesystem {
return false;
}
self::$defaultInstance = new View($root);
- self::$mounts = new Mount\Manager();
+
+ if(!self::$mounts) {
+ self::$mounts = new Mount\Manager();
+ }
//load custom mount config
self::initMountPoints($user);
@@ -233,7 +236,9 @@ class Filesystem {
}
static public function initMounts(){
- self::$mounts = new Mount\Manager();
+ if(!self::$mounts) {
+ self::$mounts = new Mount\Manager();
+ }
}
/**
@@ -451,6 +456,19 @@ class Filesystem {
}
/**
+ * @brief check if the directory should be ignored when scanning
+ * NOTE: the special directories . and .. would cause never ending recursion
+ * @param String $dir
+ * @return boolean
+ */
+ static public function isIgnoredDir($dir) {
+ if ($dir === '.' || $dir === '..') {
+ return true;
+ }
+ return false;
+ }
+
+ /**
* following functions are equivalent to their php builtin equivalents for arguments/return values.
*/
static public function mkdir($path) {