static private $usersSetup = array();
+ static private $normalizedPathCache = array();
+
/**
* classname which used for hooks handling
* used as signalclass in OC_Hooks::emit()
* @return string
*/
public static function normalizePath($path, $stripTrailingSlash = true, $isAbsolutePath = false) {
+ $cacheKey = $path.'-'.-$stripTrailingSlash.'-'.$isAbsolutePath;
+
+ if(isset(self::$normalizedPathCache[$cacheKey])) {
+ return self::$normalizedPathCache[$cacheKey];
+ }
+
if ($path == '') {
return '/';
}
//normalize unicode if possible
$path = \OC_Util::normalizeUnicode($path);
- return $windows_drive_letter . $path;
+ $normalizedPath = $windows_drive_letter . $path;
+ self::$normalizedPathCache[$cacheKey] = $normalizedPath;
+
+ return $normalizedPath;
}
/**