[MAGNOLIA-6469] Deleted folders are not detected in ClasspathResourceOrigin Created: 21/Dec/15  Updated: 29/Feb/16  Resolved: 01/Feb/16

Status: Closed
Project: Magnolia
Component/s: resource-loader
Affects Version/s: 5.4
Fix Version/s: 5.4.5

Type: Improvement Priority: Neutral
Reporter: Ilgun Ilgun Assignee: Ilgun Ilgun
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MAGNOLIA-6338 New template scripts on the classpath... Closed
supersession
is superseded by MAGNOLIA-6523 Refactor ClasspathResourceOrigin and ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: Resource reloading without restart
Sprint: Basel 32
Story Points: 1

 Description   

ClasspathScanner only detects resources files which are deleted and added. Folders are not identified upon modification , hence , ClasspathResourceOrigin is not cleaning up those deleted folders from its cache ClasspathResourceOrigin#resourceCache.

Use case:

given(user).hasResourceWithPath("/foo/bar.yaml");

when(user).deletesFolder("/foo/");

then(system).willDetectAndRemove("/foo/bar.yaml");
then(system).willStillHaveFolder("/foo/");

Possible fix for this issue is;
Upon deletion of a resource, we know that its a deletion action, and hence, we can just simply go and check the root of a given resource is yet present in ClasspathResourceOrigin#updateResourceFor(String resourcePath)



 Comments   
Comment by Michael Mühlebach [ 01/Feb/16 ]

This issue should be solved through MAGNOLIA-6523.

Generated at Mon Feb 12 04:14:49 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.