diff options
Diffstat (limited to 'lib/files/filesystem.php')
-rw-r--r-- | lib/files/filesystem.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index 5d7565f0d83..02cce001b48 100644 --- a/lib/files/filesystem.php +++ b/lib/files/filesystem.php @@ -236,7 +236,9 @@ class Filesystem { } static public function initMounts(){ - self::$mounts = new Mount\Manager(); + if(!self::$mounts) { + self::$mounts = new Mount\Manager(); + } } /** @@ -454,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) { |