diff options
author | saturneric <[email protected]> | 2024-01-18 12:58:37 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-18 12:58:37 +0000 |
commit | e0d2c4021483e6e1366c1050ccb5a30e53e172bb (patch) | |
tree | 5d85739479622e7c672aea45f84d4e2f577f9332 /src/core/utils/IOUtils.cpp | |
parent | fix: correct a fault (diff) | |
download | GpgFrontend-e0d2c4021483e6e1366c1050ccb5a30e53e172bb.tar.gz GpgFrontend-e0d2c4021483e6e1366c1050ccb5a30e53e172bb.zip |
fix: add test cases and solve discovered issues
Diffstat (limited to 'src/core/utils/IOUtils.cpp')
-rw-r--r-- | src/core/utils/IOUtils.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/utils/IOUtils.cpp b/src/core/utils/IOUtils.cpp index 5ca765d9..54fbb6c9 100644 --- a/src/core/utils/IOUtils.cpp +++ b/src/core/utils/IOUtils.cpp @@ -128,6 +128,12 @@ auto CreateTempFileAndWriteData(const QString& data) -> QString { return temp_file; } +auto CreateTempFileAndWriteData(const GFBuffer& data) -> QString { + auto temp_file = GetTempFilePath(); + WriteFile(temp_file, data.ConvertToQByteArray()); + return temp_file; +} + auto TargetFilePreCheck(const QString& path, bool read) -> std::tuple<bool, QString> { QFileInfo const file_info(path); |