diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/zen/cmds/projectstore_cmd.cpp | 7 | ||||
| -rw-r--r-- | src/zenserver/projectstore/remoteprojectstore.cpp | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/zen/cmds/projectstore_cmd.cpp b/src/zen/cmds/projectstore_cmd.cpp index 30822a8d9..6bc499f03 100644 --- a/src/zen/cmds/projectstore_cmd.cpp +++ b/src/zen/cmds/projectstore_cmd.cpp @@ -1047,15 +1047,16 @@ ExportOplogCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** arg TargetUrlBase = fmt::format("http://{}", TargetUrlBase); } + HttpClient TargetHttp(TargetUrlBase); std::string Url = fmt::format("/prj/{}/oplog/{}", m_ZenProjectName, m_ZenOplogName); bool CreateOplog = false; - if (HttpClient::Response Result = Http.Get(Url, HttpClient::Accept(ZenContentType::kJSON))) + if (HttpClient::Response Result = TargetHttp.Get(Url, HttpClient::Accept(ZenContentType::kJSON))) { if (m_ZenClean) { ZEN_WARN("Deleting zen remote oplog '{}/{}'", m_ZenProjectName, m_ZenOplogName) - Result = Http.Delete(Url, HttpClient::Accept(ZenContentType::kJSON)); + Result = TargetHttp.Delete(Url, HttpClient::Accept(ZenContentType::kJSON)); if (!Result) { Result.ThrowError("failed deleting existing zen remote oplog"sv); @@ -1077,7 +1078,7 @@ ExportOplogCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** arg if (CreateOplog) { ZEN_WARN("Creating zen remote oplog '{}/{}'", m_ZenProjectName, m_ZenOplogName); - if (HttpClient::Response Result = Http.Post(Url); !Result) + if (HttpClient::Response Result = TargetHttp.Post(Url); !Result) { Result.ThrowError("failed creating zen remote oplog"sv); return 1; diff --git a/src/zenserver/projectstore/remoteprojectstore.cpp b/src/zenserver/projectstore/remoteprojectstore.cpp index df77deab8..0589fdc5f 100644 --- a/src/zenserver/projectstore/remoteprojectstore.cpp +++ b/src/zenserver/projectstore/remoteprojectstore.cpp @@ -1688,7 +1688,7 @@ BuildContainer(CidStore& ChunkStore, IoBuffer RawData = IoBufferBuilder::MakeFromFile(FilePath); if (RawData) { - if (RawData.GetSize() > ChunkFileSizeLimit) + if (AllowChunking && RawData.GetSize() > ChunkFileSizeLimit) { IoBufferFileReference FileRef; (void)RawData.GetFileReference(FileRef); |