File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
lib/private/Files/ObjectStore Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,12 @@ public function rmdir(string $path): bool {
153153 return false ;
154154 }
155155
156- return $ this ->rmObjects ($ entry );
156+ $ result = $ this ->rmObjects ($ entry );
157+ if ($ result ) {
158+ $ this ->getUpdater ()->correctParentStorageMtime ($ path );
159+ $ this ->propagator ->propagateChange ($ path , time (), -$ entry ->getSize ());
160+ }
161+ return $ result ;
157162 }
158163
159164 private function rmObjects (ICacheEntry $ entry ): bool {
@@ -180,15 +185,22 @@ private function rmObjects(ICacheEntry $entry): bool {
180185 public function unlink (string $ path ): bool {
181186 $ path = $ this ->normalizePath ($ path );
182187 $ entry = $ this ->getCache ()->get ($ path );
188+ $ result = false ;
183189
184190 if ($ entry instanceof ICacheEntry) {
185191 if ($ entry ->getMimeType () === ICacheEntry::DIRECTORY_MIMETYPE ) {
186- return $ this ->rmObjects ($ entry );
192+ $ result = $ this ->rmObjects ($ entry );
187193 } else {
188- return $ this ->rmObject ($ entry );
194+ $ result = $ this ->rmObject ($ entry );
189195 }
190196 }
191- return false ;
197+
198+ if ($ result ) {
199+ $ this ->getUpdater ()->correctParentStorageMtime ($ path );
200+ $ this ->propagator ->propagateChange ($ path , time (), -$ entry ->getSize ());
201+ }
202+
203+ return $ result ;
192204 }
193205
194206 public function rmObject (ICacheEntry $ entry ): bool {
Original file line number Diff line number Diff line change @@ -18,4 +18,8 @@ class ObjectStoreUpdater extends Updater {
1818 public function update ($ path , $ time = null , ?int $ sizeDifference = null ) {
1919 // Noop
2020 }
21+
22+ public function remove ($ path ) {
23+ // Noop
24+ }
2125}
You can’t perform that action at this time.
0 commit comments