mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-07-05 14:34:13 +00:00
Fix paths with spaces not being treated correctly.
This commit is contained in:
parent
8fc45ce694
commit
0f7a78b395
1 changed files with 6 additions and 3 deletions
|
@ -61,7 +61,7 @@ namespace din {
|
||||||
using boost::spirit::_1;
|
using boost::spirit::_1;
|
||||||
|
|
||||||
start %= *lit("/") >> *(diritem >> *lit("/"));
|
start %= *lit("/") >> *(diritem >> *lit("/"));
|
||||||
diritem %= +(escape | (char_ - '/' - '\\' - ' '));
|
diritem %= +(escape | (char_ - '/' - '\\'));
|
||||||
escape %= lit("\\") >> (hex_code | char_);
|
escape %= lit("\\") >> (hex_code | char_);
|
||||||
hex_code = lit("x") >> hex_chara[_val += px::bind(&hex_to_str, _1)];
|
hex_code = lit("x") >> hex_chara[_val += px::bind(&hex_to_str, _1)];
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,11 @@ namespace din {
|
||||||
result
|
result
|
||||||
);
|
);
|
||||||
|
|
||||||
|
assert(parse_result);
|
||||||
|
if (not parse_result) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (not parPiece.empty() and parPiece[0] == '/') {
|
if (not parPiece.empty() and parPiece[0] == '/') {
|
||||||
m_stack.clear();
|
m_stack.clear();
|
||||||
}
|
}
|
||||||
|
@ -98,8 +103,6 @@ namespace din {
|
||||||
m_stack.push_back(std::move(itm));
|
m_stack.push_back(std::move(itm));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(parse_result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GenericPath::to_string() const {
|
std::string GenericPath::to_string() const {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue