diff options
author | KokaKiwi | 2021-11-09 16:24:14 +0100 |
---|---|---|
committer | KokaKiwi | 2021-11-09 16:24:14 +0100 |
commit | 3b22989513672fb10ff8f24d30e0793bfa10b9ea (patch) | |
tree | cac2598f6de3a9709426175b3d53e3fc12a5f4a6 /0001-Fix-raised-exception-when-a-pattern-directory-does-n.patch | |
parent | 19350099704d39430d77e747b967a463e26554c2 (diff) | |
download | aur-3b22989513672fb10ff8f24d30e0793bfa10b9ea.tar.gz |
Fix bug when listing patterns.
Diffstat (limited to '0001-Fix-raised-exception-when-a-pattern-directory-does-n.patch')
-rw-r--r-- | 0001-Fix-raised-exception-when-a-pattern-directory-does-n.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/0001-Fix-raised-exception-when-a-pattern-directory-does-n.patch b/0001-Fix-raised-exception-when-a-pattern-directory-does-n.patch new file mode 100644 index 000000000000..84b27dc23bc7 --- /dev/null +++ b/0001-Fix-raised-exception-when-a-pattern-directory-does-n.patch @@ -0,0 +1,27 @@ +From 64ce115ff948387f318f8af4fda40b9add36a254 Mon Sep 17 00:00:00 2001 +From: KokaKiwi <kokakiwi+git@kokakiwi.net> +Date: Tue, 9 Nov 2021 16:10:34 +0100 +Subject: [PATCH 1/2] Fix raised exception when a pattern directory does not + exists. + +Signed-off-by: KokaKiwi <kokakiwi+git@kokakiwi.net> +--- + source/views/view_pattern_editor.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/source/views/view_pattern_editor.cpp b/source/views/view_pattern_editor.cpp +index 2608679..475b337 100644 +--- a/source/views/view_pattern_editor.cpp ++++ b/source/views/view_pattern_editor.cpp +@@ -191,6 +191,8 @@ namespace hex { + this->m_possiblePatternFiles.clear(); + + for (auto &imhexPath : hex::getPath(ImHexPath::Patterns)) { ++ if (!fs::exists(imhexPath)) ++ continue; + for (auto &entry: fs::recursive_directory_iterator(imhexPath)) { + if (entry.is_regular_file() && entry.path().extension() == ".hexpat") { + this->m_possiblePatternFiles.push_back(entry.path()); +-- +2.33.1 + |