diff options
author | ConfuSomu | 2023-06-14 18:28:11 -0400 |
---|---|---|
committer | ConfuSomu | 2023-06-14 18:28:11 -0400 |
commit | de360a6e5c8b9a431ce1caa46a6dc0337e463b08 (patch) | |
tree | acf4ace8f1efcb06ce04a8d84f41faf92c9431ec /src/archive_parser.h | |
parent | cb70783e64d3571dd1de7dd10da6529489c0e603 (diff) | |
download | ActorViewer-de360a6e5c8b9a431ce1caa46a6dc0337e463b08.tar ActorViewer-de360a6e5c8b9a431ce1caa46a6dc0337e463b08.tar.gz ActorViewer-de360a6e5c8b9a431ce1caa46a6dc0337e463b08.zip |
Search for attachment directory root
Implement a method that finds the attachment directory root as it is
possible that the attachment url referenced in the outbox.json file
isn't relative to its location but present instead inside a subdirectory
that is next to the outbox.json file.
Diffstat (limited to 'src/archive_parser.h')
-rw-r--r-- | src/archive_parser.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/archive_parser.h b/src/archive_parser.h index 6b2baa4..419a939 100644 --- a/src/archive_parser.h +++ b/src/archive_parser.h @@ -6,6 +6,7 @@ #include <QJsonObject> #include <QJsonArray> #include <QListWidget> +#include <QDir> #include "types.h" @@ -34,10 +35,14 @@ public: QString get_html_status_text(int status_index); private: QString outbox_filename; + QDir archive_root_dir; ArchiveType archive_type; + QDir attachment_dir; + bool attachment_dir_have_to_find = true; QJsonObject *outbox_json = nullptr; QJsonArray *outbox_items = nullptr; QString get_html_status_attachments(QJsonValueRef attachments_ref, int text_zone_width); + void find_attachment_dir(QString example_attachment); }; |