Save: Inform the user when saving has failed in LOK.

Change-Id: Ie3bcdf9f6ca898b2763c31e6eb05c3a20be5859f
Reviewed-on: https://gerrit.libreoffice.org/44399
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
This commit is contained in:
Jan Holesovsky 2017-11-07 13:12:23 +01:00
parent b20faa8bdc
commit 61ce9c38e6

View file

@ -656,6 +656,14 @@ bool DocumentBroker::saveToStorageInternal(const std::string& sessionId,
return false;
}
// Check that we are actually about to upload a successfully saved document.
if (!success)
{
LOG_ERR("Cannot save docKey [" << _docKey << "], the .uno:Save has failed in LOK.");
it->second->sendTextFrame("error: cmd=storage kind=savefailed");
return false;
}
const Authorization auth = it->second->getAuthorization();
const auto uri = isSaveAs? saveAsPath: it->second->getPublicUri().toString();