wsd: simplify uriPublic in DocumentBroker::download()

Change-Id: I5ca31e08716db4c0a47a952b89e6529b330b6370
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This commit is contained in:
Ashod Nakashian 2024-03-29 15:55:15 -04:00 committed by Michael Meeks
parent e9591cfa25
commit deb60c095d

View file

@ -996,6 +996,7 @@ bool DocumentBroker::download(
// /tmp/user/docs/<dirName>, root under getJailRoot()
const Poco::Path jailPath(JAILED_DOCUMENT_ROOT, Util::rng::getFilename(16));
const std::string jailRoot = getJailRoot();
const Poco::URI& uriPublic = session->getPublicUri();
LOG_INF("JailPath for docKey [" << _docKey << "]: [" << jailPath.toString() << "], jailRoot: ["
<< jailRoot << ']');
@ -1007,7 +1008,6 @@ bool DocumentBroker::download(
// Pass the public URI to storage as it needs to load using the token
// and other storage-specific data provided in the URI.
const Poco::URI& uriPublic = session->getPublicUri();
LOG_DBG("Creating new storage instance for URI ["
<< COOLWSD::anonymizeUrl(uriPublic.toString()) << ']');
@ -1240,7 +1240,7 @@ bool DocumentBroker::download(
const StorageBase::FileInfo fileInfo = _storage->getFileInfo();
if (!fileInfo.isValid())
{
LOG_ERR("Invalid fileinfo for URI [" << session->getPublicUri().toString() << "].");
LOG_ERR("Invalid fileinfo for URI [" << uriPublic.toString() << ']');
return false;
}