From bca4e53e77fbaa6a1be438b0a0274738c79c176c Mon Sep 17 00:00:00 2001 From: yhc <66239555+Yhcrown@users.noreply.github.com> Date: Thu, 5 May 2022 22:20:13 -0500 Subject: [PATCH] Update the path patterns of static files while refreshing (#1907) * Fixed the bug of not being able to query according to the content The content table is associated at query time now. * Update static file mappings on refresh --- .../halo/app/service/impl/StaticStorageServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/run/halo/app/service/impl/StaticStorageServiceImpl.java b/src/main/java/run/halo/app/service/impl/StaticStorageServiceImpl.java index 341406f0a..1e1367ced 100644 --- a/src/main/java/run/halo/app/service/impl/StaticStorageServiceImpl.java +++ b/src/main/java/run/halo/app/service/impl/StaticStorageServiceImpl.java @@ -53,7 +53,12 @@ public class StaticStorageServiceImpl @Override public List listStaticFolder() { - return listStaticFileTree(staticDir); + + List staticFiles = listStaticFileTree(staticDir); + + onChange(); // To update the mapping of local files. + + return staticFiles; } @Nullable