mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Attempt to unescape characters when constructing file paths, introducing compilation errors.
This commit is contained in:
parent
4ac5174d89
commit
95d2c7ea5c
4 changed files with 49 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
|||
#include <boost/program_options.hpp>
|
||||
|
||||
#include <components/files/configurationmanager.hpp>
|
||||
#include <components/files/multidircollection.hpp>
|
||||
|
||||
// Parses and validates a fallback map from boost program_options.
|
||||
// Note: for boost to pick up the validate function, you need to pull in the namespace e.g.
|
||||
|
@ -66,6 +67,23 @@ namespace Files {
|
|||
for (std::vector<std::string>::const_iterator it = tokens.begin(); it != tokens.end(); ++it)
|
||||
eSV->mVector.push_back(EscapeHashString(*it));
|
||||
}
|
||||
|
||||
struct EscapePathContainer {
|
||||
PathContainer mContainer;
|
||||
};
|
||||
|
||||
std::istream & operator>> (std::istream & istream, EscapePathContainer & escapePathContainer)
|
||||
{
|
||||
std::cout << "The new dodgy operator>> is being used" << std::endl;
|
||||
|
||||
boost::iostreams::filtering_istream filteredStream;
|
||||
filteredStream.push(unescape_hash_filter());
|
||||
filteredStream.push(istream);
|
||||
|
||||
filteredStream >> escapePathContainer.mContainer;
|
||||
|
||||
return istream;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue