summaryrefslogtreecommitdiff
path: root/cabinet/magic.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'cabinet/magic.hpp')
-rw-r--r--cabinet/magic.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/cabinet/magic.hpp b/cabinet/magic.hpp
index 96f4b08..9e078de 100644
--- a/cabinet/magic.hpp
+++ b/cabinet/magic.hpp
@@ -54,10 +54,12 @@ namespace cab
auto operator=(magic const &) -> magic & = delete;
auto operator=(magic && other) noexcept -> magic &;
- auto process(std::filesystem::path path) -> std::expected<std::string, std::string>;
- auto process(int file_descriptor) -> std::expected<std::string, std::string>;
+ auto process(std::filesystem::path path) -> std::expected<std::string, std::error_code>;
+ auto process(int file_descriptor) -> std::expected<std::string, std::error_code>;
private:
+ auto handle_result(char const * result) -> std::expected<std::string, std::error_code>;
+
explicit magic(::magic_t cookie) noexcept;
::magic_t m_cookie{};