Skip to content

Commit 74efe15

Browse files
committed
account for spaces in filenames
1 parent 7077a43 commit 74efe15

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cli/processexecutor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,11 @@ unsigned int ProcessExecutor::check()
334334
if (p != pipeFile.cend()) {
335335
pipeFile.erase(p);
336336
const auto fs = std::find_if(mFileSettings.cbegin(), mFileSettings.cend(), [&name](const FileSettings& entry) {
337-
return entry.filename() == name.substr(0, name.find(' '));
337+
return name.find(entry.filename() + " ") == 0;
338338
});
339339
if (fs == mFileSettings.cend()) {
340340
const auto fwd = std::find_if(mFiles.cbegin(), mFiles.cend(), [&name](const FileWithDetails &entry) {
341-
return entry.path() == name.substr(0, name.find(' '));
341+
return name.find(entry.path() + " ") == 0;
342342
});
343343
if (fwd != mFiles.cend()) {
344344
size = fwd->size();

0 commit comments

Comments
 (0)