ENH: fix bug in depend file removing for deleted depend files
This commit is contained in:
parent
df37d871c4
commit
baffdde535
|
@ -322,12 +322,13 @@ const char* cmDependsC::ParseFileName(const char* in, std::string& name)
|
||||||
// are in a quoted string OR the current character isn't a : or the second
|
// are in a quoted string OR the current character isn't a : or the second
|
||||||
// character AND it isn't a space
|
// character AND it isn't a space
|
||||||
for(;*c && (quoted ||
|
for(;*c && (quoted ||
|
||||||
((*c != ':' || pos > buf) && !isspace(*c))); ++c)
|
((*c != ':' || pos == buf+1) && !isspace(*c))); ++c)
|
||||||
{
|
{
|
||||||
if(*c == '"')
|
if(*c == '"')
|
||||||
{
|
{
|
||||||
quoted = !quoted;
|
quoted = !quoted;
|
||||||
}
|
}
|
||||||
|
// handle unquoted escaped spaces
|
||||||
else if(!quoted && *c == '\\' && isspace(*(c+1)))
|
else if(!quoted && *c == '\\' && isspace(*(c+1)))
|
||||||
{
|
{
|
||||||
*pos = *(++c);
|
*pos = *(++c);
|
||||||
|
@ -340,7 +341,7 @@ const char* cmDependsC::ParseFileName(const char* in, std::string& name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*pos =0;
|
*pos =0;
|
||||||
name += pos;
|
name += buf;
|
||||||
delete [] buf;
|
delete [] buf;
|
||||||
// Return the ending position.
|
// Return the ending position.
|
||||||
return c;
|
return c;
|
||||||
|
|
Loading…
Reference in New Issue