From: Harishankar Date: Fri, 22 May 2020 16:18:55 +0000 (+0530) Subject: Check added for symlink - to avoid symlinks in the source path X-Git-Url: https://harishankar.org/repos/?a=commitdiff_plain;h=4f787d18286fb9a4c5a36d802860c42c9f862854;p=biaweb2.git 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 --- 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 +