summaryrefslogtreecommitdiffstats
path: root/kit
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2024-04-16 15:02:28 +0100
committerCaolán McNamara <caolanm@gmail.com>2024-04-16 16:43:52 +0100
commitaf749c223737166b6e4c4bc581479c542b54f6e8 (patch)
tree750f527a81ff689e14b7dbdcab019da8b26801e0 /kit
parentbgsave: add unit testing hooks for after bgsave fork & pre exit. (diff)
downloadonline-af749c223737166b6e4c4bc581479c542b54f6e8.tar.gz
online-af749c223737166b6e4c4bc581479c542b54f6e8.zip
bgsave: rename parameter to background, and add setting.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Change-Id: Ic49ec5715682b71461b49741d022fc7149aa5a13
Diffstat (limited to 'kit')
-rw-r--r--kit/ChildSession.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 25e6b1a74f..cd43b63178 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -551,15 +551,13 @@ bool ChildSession::_handleInput(const char *buffer, int length)
}
else if (tokens.equals(0, "save"))
{
- static bool doBgSave = !!getenv("COOL_BGSAVE");
+ bool background = tokens[1] == "background=true";
+ SigUtil::addActivity(getId(), (background ? "bg " : "") + firstLine);
- SigUtil::addActivity(getId(), (doBgSave ? "bg " : "") + firstLine);
-
- bool autosave = tokens[1] == "autosave=true";
StringVector unoSave = StringVector::tokenize("uno .uno:Save " + tokens.cat(' ', 2));
bool saving = false;
- if (doBgSave && autosave)
+ if (background)
saving = !saveDocumentBackground(unoSave);
if (!saving)