From a225e71bc0656e45194aec40f336c7502d3bc99d Mon Sep 17 00:00:00 2001 From: kapitainsky Date: Fri, 21 Feb 2020 13:49:02 +0000 Subject: [PATCH] changed default rclone options parsing - #79 to allow spaces inside option e.g. --password-command="pass rclone/config" --- src/utils.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp index 5e2823a8..0884634b 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -274,8 +274,11 @@ QStringList GetDefaultRcloneOptionsList() { settings->value("Settings/defaultRcloneOptions").toString(); QStringList defaultRcloneOptionsList; if (!defaultRcloneOptions.isEmpty()) { - for (auto arg : defaultRcloneOptions.split(' ')) { - defaultRcloneOptionsList << arg; + QRegExp separator("--"); + for (auto arg : defaultRcloneOptions.split(separator)) { + if (!arg.isEmpty()) { + defaultRcloneOptionsList << "--"+arg; + } } } return defaultRcloneOptionsList;