diff options
| author | Martin Ridgers <[email protected]> | 2023-02-21 13:00:07 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2023-02-22 08:13:50 +0100 |
| commit | 2ef22318c16d6ac6c733784b28d0427db2e28062 (patch) | |
| tree | 6d5c12e9b6b8339921cbe35354425d34a5cf8634 /zenserver/frontend/frontend.cpp | |
| parent | The start of a Zip archive can be calculated using its own data (diff) | |
| download | zen-2ef22318c16d6ac6c733784b28d0427db2e28062.tar.xz zen-2ef22318c16d6ac6c733784b28d0427db2e28062.zip | |
There is no need to calculate the start of a zip archive.
As zip files' directory structures are at the end of an archive, and
Zen's dashboard archive is always at the end of the binary, there is no
need to workout where the start of the archive is. A future improvement
could be to only buffer the tail of the file.
Diffstat (limited to 'zenserver/frontend/frontend.cpp')
| -rw-r--r-- | zenserver/frontend/frontend.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/zenserver/frontend/frontend.cpp b/zenserver/frontend/frontend.cpp index 1b6fe6378..6aab63a04 100644 --- a/zenserver/frontend/frontend.cpp +++ b/zenserver/frontend/frontend.cpp @@ -149,12 +149,8 @@ HttpFrontendService::HttpFrontendService(std::filesystem::path Directory) : m_Di std::filesystem::path SelfPath = GetRunningExecutablePath(); // Locate a .zip file appended onto the end of this binary - IoBuffer SelfBuffer = IoBufferBuilder::MakeFromFile(SelfPath); - IoBuffer SelfTailBuffer = FindZipFsInBinary(SelfBuffer); - if (SelfTailBuffer) - { - m_ZipFs = ZipFs(std::move(SelfTailBuffer)); - } + IoBuffer SelfBuffer = IoBufferBuilder::MakeFromFile(SelfPath); + m_ZipFs = ZipFs(std::move(SelfBuffer)); #if ZEN_BUILD_DEBUG if (!Directory.empty()) |