Fixed issue #946 for the case of file paths with blanks

This commit is contained in:
Matthias Koefferlein 2021-12-15 23:04:58 +01:00
parent 3ef28c8a9d
commit 07515cd716
1 changed files with 6 additions and 2 deletions

View File

@ -134,7 +134,11 @@ IncludeExpander::to_string () const
tl_assert (m_sections.begin ()->second.second == 0);
std::string fn = m_sections.begin ()->second.first;
return tl::to_word_or_quoted_string (fn, valid_fn_chars);
if (! fn.empty () && fn.front () == '@') {
return tl::to_quoted_string (fn);
} else {
return fn;
}
} else {
@ -166,7 +170,7 @@ IncludeExpander::from_string (const std::string &s)
ex.read_quoted (ie.m_sections [1].first);
} else if (ex.test ("@")) {
} else if (*ex == '@') {
while (! ex.at_end ()) {