| @@ 114-125 (lines=12) @@ | ||
| 111 | * @param string $path |
|
| 112 | * @return string |
|
| 113 | */ |
|
| 114 | private function normalizePath($path) { |
|
| 115 | $path = trim($path, '/'); |
|
| 116 | //FIXME why do we sometimes get a path like 'files//username'? |
|
| 117 | $path = str_replace('//', '/', $path); |
|
| 118 | ||
| 119 | // dirname('/folder') returns '.' but internally (in the cache) we store the root as '' |
|
| 120 | if (!$path || $path === '.') { |
|
| 121 | $path = ''; |
|
| 122 | } |
|
| 123 | ||
| 124 | return $path; |
|
| 125 | } |
|
| 126 | ||
| 127 | /** |
|
| 128 | * Object Stores use a NoopScanner because metadata is directly stored in |
|
| @@ 87-97 (lines=11) @@ | ||
| 84 | /** |
|
| 85 | * @param string $path |
|
| 86 | */ |
|
| 87 | private function normalizePath($path) { |
|
| 88 | $path = trim($path, '/'); |
|
| 89 | ||
| 90 | if (!$path) { |
|
| 91 | $path = '.'; |
|
| 92 | } |
|
| 93 | ||
| 94 | $path = str_replace('#', '%23', $path); |
|
| 95 | ||
| 96 | return $path; |
|
| 97 | } |
|
| 98 | ||
| 99 | const SUBCONTAINER_FILE = '.subcontainers'; |
|
| 100 | ||