From 1373b1983c9e3f3968bc8faf42d5f114828f15d8 Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Mon, 7 Oct 2024 11:38:47 +0800 Subject: [PATCH] [29_12] Fix when the included file is tmfs or web --- src/Plugins/Pdf/pdf_hummus_make_attachment.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Plugins/Pdf/pdf_hummus_make_attachment.cpp b/src/Plugins/Pdf/pdf_hummus_make_attachment.cpp index 2a5a1785e8..98dd3d9453 100644 --- a/src/Plugins/Pdf/pdf_hummus_make_attachment.cpp +++ b/src/Plugins/Pdf/pdf_hummus_make_attachment.cpp @@ -20,6 +20,7 @@ #include "PDFWriter/Trace.h" #include "file.hpp" #include "tm_debug.hpp" +#include "tmfs_url.hpp" using namespace PDFHummus; using namespace IOBasicTypes; @@ -71,10 +72,10 @@ pdf_hummus_make_attachments (url pdf_path, array attachment_paths, if (DEBUG_CONVERT) debug_convert << "N (attachment_paths) is 0" << LF; return false; } - for (int i= 0; i < N (attachment_paths); i++) { - if (!is_regular (attachment_paths[i])) { + for (url path : attachment_paths) { + if (!is_regular (path) && !is_rooted_web (path) && !is_rooted_tmfs (path)) { if (DEBUG_CONVERT) - debug_convert << attachment_paths[i] << " is not regular" << LF; + debug_convert << path << " is not regular or web or tmfs" << LF; return false; } }