From 4f787d18286fb9a4c5a36d802860c42c9f862854 Mon Sep 17 00:00:00 2001 From: Harishankar Date: Fri, 22 May 2020 21:48:55 +0530 Subject: [PATCH] Check added for symlink - to avoid symlinks in the source path Added check to prevent symlink from being followed in the document tree generation to avoid complications. Also minor change to rss item template --- biawebdocumenttree.hpp | 4 ++-- templates/rssitem.tpl.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/biawebdocumenttree.hpp b/biawebdocumenttree.hpp index 5df2e9b..53023f1 100644 --- a/biawebdocumenttree.hpp +++ b/biawebdocumenttree.hpp @@ -309,8 +309,8 @@ namespace biaweb { this->add_child (doctree.get()); } - // add the regular files as documents in the tree - else if (fsitem.is_regular_file ()) { + // add the regular files as documents in the tree and not symlink + else if (fsitem.is_regular_file () && !fsitem.is_symlink()) { // if it is an index file (specially named as index // or index.md or whatever) directly add // the contents to the summary of the Doctree diff --git a/templates/rssitem.tpl.xml b/templates/rssitem.tpl.xml index b7bdfa1..3b3c85f 100644 --- a/templates/rssitem.tpl.xml +++ b/templates/rssitem.tpl.xml @@ -4,6 +4,6 @@ http://my.site/{url} - http://my.site/{url} + http://my.site/{url} {pubdate:%a, %d %b %Y %H:%M:%S %z} - \ No newline at end of file + -- 2.20.1