Commit 1fefe18
committed
Make sure we set init the storage before trying to get the cache
without the init the following could happen if there had been no access
to the storage yet.
1. Call getCache
2. Since the storage is not init yet, $this->cache and $this->storage
are not set yet
3. Construct a new \OCA\Files_Sharing\Cache
i. This calls $this->getSourceRootInfo()
ii. This then calls init
iii. Init fails and sets storage to FailedStorage and cache to
FailedCache
4. We set cache to the newly constructed \OCA\Files_Sharing\Cache
* It should just be a FailedCache
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>1 parent e513506 commit 1fefe18
File tree
1 file changed
+4
-0
lines changed- apps/files_sharing/lib
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
357 | 359 | | |
358 | 360 | | |
359 | 361 | | |
| 362 | + | |
| 363 | + | |
360 | 364 | | |
361 | 365 | | |
362 | 366 | | |
| |||
0 commit comments