diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-05-27 11:35:57 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-05-27 11:35:57 -0400 |
commit | 16925672e885071afab1fe158dc206ab8ed93baf (patch) | |
tree | 143f64c88d7d47cb0f5a3a7641228a7cae24821b /lib/files/filesystem.php | |
parent | 0953b68556152187ed305323b64b186cc21c2ade (diff) | |
parent | 0c621ff6a93fe1b34c77257d83fd344489f59bab (diff) | |
download | nextcloud-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.php | 22 |
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) { |