File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -404,4 +404,23 @@ public function dataTestIsPartialFile() {
404404 ['/sub/folder/foo.txt ' , false ],
405405 ];
406406 }
407+
408+ public function testNoETagUnscannedFolder () {
409+ $ this ->fillTestFolders ();
410+
411+ $ this ->scanner ->scan ('' );
412+
413+ $ oldFolderEntry = $ this ->cache ->get ('folder ' );
414+ // create a new file in a folder by keeping the mtime unchanged, but mark the folder as unscanned
415+ $ this ->storage ->file_put_contents ('folder/new.txt ' , 'foo ' );
416+ $ this ->storage ->touch ('folder ' , $ oldFolderEntry ->getMTime ());
417+ $ this ->cache ->update ($ oldFolderEntry ->getId (), ['size ' => -1 ]);
418+
419+ $ this ->scanner ->scan ('' );
420+
421+ $ this ->cache ->inCache ('folder/new.txt ' );
422+
423+ $ newFolderEntry = $ this ->cache ->get ('folder ' );
424+ $ this ->assertNotEquals ($ newFolderEntry ->getEtag (), $ oldFolderEntry ->getEtag ());
425+ }
407426}
You can’t perform that action at this time.
0 commit comments