You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2021/02/23 00:11:48 UTC
[isis] 10/11: ISIS-2444: generalizes logic to not remove files
under /hooks/
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
commit e7796b5878979f015f8dd98ebb0acffc1c7c9d43
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Feb 22 23:38:48 2021 +0000
ISIS-2444: generalizes logic to not remove files under /hooks/
---
.../java/org/apache/isis/tooling/cli/projdoc/ProjectDocWriter.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tooling/cli/src/main/java/org/apache/isis/tooling/cli/projdoc/ProjectDocWriter.java b/tooling/cli/src/main/java/org/apache/isis/tooling/cli/projdoc/ProjectDocWriter.java
index b8cc9ea..ff957bf 100644
--- a/tooling/cli/src/main/java/org/apache/isis/tooling/cli/projdoc/ProjectDocWriter.java
+++ b/tooling/cli/src/main/java/org/apache/isis/tooling/cli/projdoc/ProjectDocWriter.java
@@ -76,9 +76,11 @@ final class ProjectDocWriter {
// delete all generated documents in the index
_Files.searchFiles(pagesFolder, dir->true, file-> {
val fileName = file.getName();
- final String parentFile = file.getParentFile().getName();
+ val fileAbsolutePath = file.getAbsolutePath();
+ final File parentFile = file.getParentFile();
+ final String parentFileName = parentFile.getName();
return fileName.endsWith(".adoc") &&
- !parentFile.equals("hooks") &&
+ !fileAbsolutePath.contains(File.separatorChar + "hooks" + File.separatorChar) &&
!fileName.equals(overview.getSystemOverviewFilename());
})
.stream()