diff --git a/Changelog.md b/Changelog.md index 189444081..b82c3f00a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -79,6 +79,7 @@ Compiler Features: Bugfixes: * Tests: Fix chain parameters to make ipc tests work with newer versions of cpp-ethereum. * Code Generator: Fix allocation of byte arrays (zeroed out too much memory). + * Commandline Interface: Correctly handle paths with backslashes on windows. * Fix NatSpec json output for `@notice` and `@dev` tags on contract definitions. * References Resolver: Enforce ``storage`` as data location for mappings. * References Resolver: Report error instead of assertion fail when FunctionType has an undeclared type as parameter. diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 55086e9f4..147937597 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -424,7 +424,7 @@ bool CommandLineInterface::readInputFilesAndConfigureRemappings() continue; } - m_sourceCodes[infile.string()] = dev::readFileAsString(infile.string()); + m_sourceCodes[infile.generic_string()] = dev::readFileAsString(infile.string()); path = boost::filesystem::canonical(infile).string(); } m_allowedDirectories.push_back(boost::filesystem::path(path).remove_filename()); @@ -709,7 +709,7 @@ bool CommandLineInterface::processInput() return ReadCallback::Result{false, "Not a valid file."}; auto contents = dev::readFileAsString(canonicalPath.string()); - m_sourceCodes[path.string()] = contents; + m_sourceCodes[path.generic_string()] = contents; return ReadCallback::Result{true, contents}; } catch (Exception const& _exception)