diff options
author | saturneric <[email protected]> | 2023-11-07 07:18:06 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-11-07 07:18:06 +0000 |
commit | 3ad7fecdb6458fdd6f146bed19fe643c7f93e905 (patch) | |
tree | 522f7a5dd0389ad0771d01a50ea49ef646940894 /src/core/function/ArchiveFileOperator.cpp | |
parent | refactor: improve the code structure of core (diff) | |
download | GpgFrontend-3ad7fecdb6458fdd6f146bed19fe643c7f93e905.tar.gz GpgFrontend-3ad7fecdb6458fdd6f146bed19fe643c7f93e905.zip |
refactor: remove CommonUtils at core
Diffstat (limited to 'src/core/function/ArchiveFileOperator.cpp')
-rw-r--r-- | src/core/function/ArchiveFileOperator.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/function/ArchiveFileOperator.cpp b/src/core/function/ArchiveFileOperator.cpp index 27d18803..18920e75 100644 --- a/src/core/function/ArchiveFileOperator.cpp +++ b/src/core/function/ArchiveFileOperator.cpp @@ -39,7 +39,7 @@ struct ArchiveStruct { std::string name; }; -int copy_data(struct archive *ar, struct archive *aw) { +auto copy_data(struct archive *ar, struct archive *aw) -> int { int r; const void *buff; size_t size; @@ -112,8 +112,9 @@ void GpgFrontend::ArchiveFileOperator::CreateArchive( auto u8_filename = relative_archive_path.u8string(); - if (!u8_filename.empty() && u8_filename == u8"-") + if (!u8_filename.empty() && u8_filename == u8"-") { throw std::runtime_error("cannot write to stdout"); + } #ifdef WINDOWS archive_write_open_filename_w(a, relative_archive_path.wstring().c_str()); |