Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6469

Deleted folders are not detected in ClasspathResourceOrigin

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Obsolete
    • Neutral
    • 5.4.5
    • 5.4
    • resource-loader
    • None

    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)

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                ilgun Ilgun Ilgun
                ilgun Ilgun Ilgun
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD