@@ -210,11 +210,10 @@ ImportProject::Type ImportProject::import(const std::string &filename, Settings
210210 return ImportProject::Type::FAILURE;
211211}
212212
213- static std::string readUntil (const std::string &command, std::string::size_type *pos, const char until[])
213+ static std::string readUntil (const std::string &command, std::string::size_type *pos, const char until[], bool str = false )
214214{
215215 std::string ret;
216216 bool escapedString = false ;
217- bool str = false ;
218217 bool escape = false ;
219218 for (; *pos < command.size () && (str || !std::strchr (until, command[*pos])); (*pos)++) {
220219 if (escape)
@@ -280,13 +279,12 @@ void ImportProject::fsParseCommand(FileSettings& fs, const std::string& command,
280279 break ;
281280 const char F = command[pos++];
282281 if (std::strchr (" DUI" , F)) {
283- while (pos < command.size () && command[pos] == ' ' ) {
282+ while (pos < command.size () && command[pos] == ' ' )
284283 ++pos;
285- wholeArgQuoted = false ;
286- }
287284 }
288- const char *readUntilChars = wholeArgQuoted ? " =\" " : " =" ;
289- std::string fval = readUntil (command, &pos, readUntilChars);
285+ std::string fval = readUntil (command, &pos, " =" , wholeArgQuoted);
286+ if (wholeArgQuoted && fval.back () == ' \" ' )
287+ fval = fval.substr (0 , fval.size () - 1 );
290288 if (F==' D' ) {
291289 std::string defval = readUntil (command, &pos, " " );
292290 defs += fval;
0 commit comments