@@ -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)
@@ -266,6 +265,13 @@ void ImportProject::fsParseCommand(FileSettings& fs, const std::string& command,
266265 pos++;
267266 if (pos >= command.size ())
268267 break ;
268+ bool wholeArgQuoted = false ;
269+ if (command[pos] == ' "' ) {
270+ wholeArgQuoted = true ;
271+ pos++;
272+ if (pos >= command.size ())
273+ break ;
274+ }
269275 if (command[pos] != ' /' && command[pos] != ' -' )
270276 continue ;
271277 pos++;
@@ -276,7 +282,9 @@ void ImportProject::fsParseCommand(FileSettings& fs, const std::string& command,
276282 while (pos < command.size () && command[pos] == ' ' )
277283 ++pos;
278284 }
279- std::string fval = readUntil (command, &pos, " =" );
285+ std::string fval = readUntil (command, &pos, " =" , wholeArgQuoted);
286+ if (wholeArgQuoted && fval.back () == ' \" ' )
287+ fval.resize (fval.size () - 1 );
280288 if (F==' D' ) {
281289 std::string defval = readUntil (command, &pos, " " );
282290 defs += fval;
0 commit comments