summaryrefslogtreecommitdiffstats
path: root/wsd/FileServer.cpp
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2020-06-01 19:41:08 -0400
committerAshod Nakashian <ashnakash@gmail.com>2020-06-02 17:22:26 +0200
commit6ab64ac992a72681f6d8ce3436295ea4878dbece (patch)
treec408c9738d53fa4a53cbf59c1d1c9afa6e71c5b8 /wsd/FileServer.cpp
parentleaflet: update mcustomscrollbar.js file. (diff)
downloadonline-6ab64ac992a72681f6d8ce3436295ea4878dbece.tar.gz
online-6ab64ac992a72681f6d8ce3436295ea4878dbece.zip
wsd: single-char string literals -> char
Change-Id: I163d6fe1c80334317d38f8fed2199ad2b31a0f8a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95335 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'wsd/FileServer.cpp')
-rw-r--r--wsd/FileServer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 791e6313f4..e833a7f829 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -529,6 +529,7 @@ void FileServerRequestHandler::readDirToHash(const std::string &basePath, const
size_t fileCount = 0;
std::string filesRead;
+ filesRead.reserve(1024);
while ((currentFile = readdir(workingdir)) != nullptr)
{
@@ -544,7 +545,8 @@ void FileServerRequestHandler::readDirToHash(const std::string &basePath, const
else if (S_ISREG(fileStat.st_mode))
{
fileCount++;
- filesRead.append(currentFile->d_name) + ' ';
+ filesRead.append(currentFile->d_name);
+ filesRead += ' ';
std::ifstream file(basePath + relPath, std::ios::binary);