diff options
author | Andras Timar <andras.timar@collabora.com> | 2021-11-28 17:53:45 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-11-29 13:37:19 +0100 |
commit | b40a72877aee589884607c0c321736aa9cea4e86 (patch) | |
tree | f84cbe939b3625a9beac9129c9258a0382e104b7 | |
parent | perf-test: print out URL to watch document from. (diff) | |
download | online-b40a72877aee589884607c0c321736aa9cea4e86.tar.gz online-b40a72877aee589884607c0c321736aa9cea4e86.zip |
quarantine: add the original file name to the quarantined file name
Instead of
1638118271_12013_%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F289_ocvq040ushf2
we would get
1638118271_12013_%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F289_ocvq040ushf2_bad.docx
I find it more useful.
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I50918908173adeb68964b2aa542592b57ec82020
-rw-r--r-- | wsd/QuarantineUtil.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wsd/QuarantineUtil.cpp b/wsd/QuarantineUtil.cpp index 3a5e6bc57d..06660ee55b 100644 --- a/wsd/QuarantineUtil.cpp +++ b/wsd/QuarantineUtil.cpp @@ -142,7 +142,7 @@ namespace Quarantine std::string sourcefilePath = COOLWSD::ChildRoot + "tmp/cool-" + docBroker->getJailId() + "/user/docs/" + docBroker->getJailId() + "/" + docName; - std::string linkedFileName = ts + "_" + std::to_string(docBroker->getPid()) + "_" + docKey; + std::string linkedFileName = ts + '_' + std::to_string(docBroker->getPid()) + '_' + docKey + '_' + docName; std::string linkedFilePath = COOLWSD::QuarantinePath + linkedFileName; auto& fileList = COOLWSD::QuarantineMap[docBroker->getDocKey()]; |