LOOLSession: handle file:// in the ToPrisoner saveas input handler
This commit is contained in:
parent
dc56637e11
commit
847c65cb1c
1 changed files with 10 additions and 0 deletions
|
@ -192,9 +192,19 @@ bool MasterProcessSession::handleInput(const char *buffer, int length)
|
|||
return true;
|
||||
|
||||
if (peer)
|
||||
{
|
||||
// Save as completed, inform the other (Kind::ToClient)
|
||||
// MasterProcessSession about it.
|
||||
|
||||
const std::string filePrefix("file:///");
|
||||
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()));
|
||||
url = filePrefix + path.toString().substr(1);
|
||||
}
|
||||
peer->_saveAsQueue.put(url);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue