loolwsd: removed superfluous getJailPath

Change-Id: Iff11ea791866f31a47cf0d0b1d1fb06d18f5be40
Reviewed-on: https://gerrit.libreoffice.org/23218
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian 2016-03-12 20:20:49 -05:00 committed by Ashod Nakashian
parent c0cf48f5ac
commit c6b47cc437
2 changed files with 4 additions and 9 deletions

View file

@ -95,7 +95,7 @@ public:
}
/// Loads a document from the public URI into the jail.
bool load(const std::string& jailRoot, const std::string& jailId)
bool load(const std::string& jailId)
{
Log::debug("Loading from URI: " + _uriPublic.toString());
@ -114,6 +114,7 @@ public:
// user/doc/jailId
const auto jailPath = Poco::Path(JailedDocumentRoot, jailId);
const std::string jailRoot = getJailRoot();
Log::info("jailPath: " + jailPath.toString() + ", jailRoot: " + jailRoot);

View file

@ -195,7 +195,7 @@ bool MasterProcessSession::_handleInput(const char *buffer, int length)
if (url.find(filePrefix) == 0)
{
// Rewrite file:// URLs, as they are visible to the outside world.
Path path(MasterProcessSession::getJailPath(_childId), url.substr(filePrefix.length()));
const Path path(_docBroker->getJailRoot(), url.substr(filePrefix.length()));
url = filePrefix + path.toString().substr(1);
}
peer->_saveAsQueue.put(url);
@ -424,12 +424,6 @@ bool MasterProcessSession::haveSeparateProcess()
{
return !_childId.empty();
}
Poco::Path MasterProcessSession::getJailPath(const std::string& childId)
{
return Path::forDirectory(LOOLWSD::ChildRoot + Path::separator() + childId);
}
bool MasterProcessSession::invalidateTiles(const char* /*buffer*/, int /*length*/, StringTokenizer& tokens)
{
int part, tilePosX, tilePosY, tileWidth, tileHeight;
@ -808,7 +802,7 @@ void MasterProcessSession::dispatchChild()
}
const auto jailRoot = Poco::Path(LOOLWSD::ChildRoot, childSession->_childId);
_docBroker->load(jailRoot.toString(), childSession->_childId);
_docBroker->load(childSession->_childId);
_peer = childSession;
childSession->_peer = shared_from_this();