@@ -200,7 +200,7 @@ void CommandLineInterface::handleBinary(string const& _contract)
200
200
if (m_args.count (g_argCloneBinary))
201
201
{
202
202
if (m_args.count (g_argOutputDir))
203
- createFile (_contract + " .clone_bin" , m_compiler->cloneObject (_contract).toHex ());
203
+ createFile (m_compiler-> filesystemFriendlyName ( _contract) + " .clone_bin" , m_compiler->cloneObject (_contract).toHex ());
204
204
else
205
205
{
206
206
cout << " Clone Binary: " << endl;
@@ -210,7 +210,7 @@ void CommandLineInterface::handleBinary(string const& _contract)
210
210
if (m_args.count (g_argBinaryRuntime))
211
211
{
212
212
if (m_args.count (g_argOutputDir))
213
- createFile (_contract + " .bin-runtime" , m_compiler->runtimeObject (_contract).toHex ());
213
+ createFile (m_compiler-> filesystemFriendlyName ( _contract) + " .bin-runtime" , m_compiler->runtimeObject (_contract).toHex ());
214
214
else
215
215
{
216
216
cout << " Binary of the runtime part: " << endl;
@@ -222,7 +222,7 @@ void CommandLineInterface::handleBinary(string const& _contract)
222
222
void CommandLineInterface::handleOpcode (string const & _contract)
223
223
{
224
224
if (m_args.count (g_argOutputDir))
225
- createFile (_contract + " .opcode" , solidity::disassemble (m_compiler->object (_contract).bytecode ));
225
+ createFile (m_compiler-> filesystemFriendlyName ( _contract) + " .opcode" , solidity::disassemble (m_compiler->object (_contract).bytecode ));
226
226
else
227
227
{
228
228
cout << " Opcodes: " << endl;
@@ -249,7 +249,7 @@ void CommandLineInterface::handleSignatureHashes(string const& _contract)
249
249
out += toHex (it.first .ref ()) + " : " + it.second ->externalSignature () + " \n " ;
250
250
251
251
if (m_args.count (g_argOutputDir))
252
- createFile (_contract + " .signatures" , out);
252
+ createFile (m_compiler-> filesystemFriendlyName ( _contract) + " .signatures" , out);
253
253
else
254
254
cout << " Function signatures: " << endl << out;
255
255
}
@@ -261,7 +261,7 @@ void CommandLineInterface::handleOnChainMetadata(string const& _contract)
261
261
262
262
string data = m_compiler->onChainMetadata (_contract);
263
263
if (m_args.count (" output-dir" ))
264
- createFile (_contract + " _meta.json" , data);
264
+ createFile (m_compiler-> filesystemFriendlyName ( _contract) + " _meta.json" , data);
265
265
else
266
266
cout << " Metadata: " << endl << data << endl;
267
267
}
@@ -302,7 +302,7 @@ void CommandLineInterface::handleMeta(DocumentationType _type, string const& _co
302
302
output = dev::jsonPrettyPrint (m_compiler->metadata (_contract, _type));
303
303
304
304
if (m_args.count (g_argOutputDir))
305
- createFile (_contract + suffix, output);
305
+ createFile (m_compiler-> filesystemFriendlyName ( _contract) + suffix, output);
306
306
else
307
307
{
308
308
cout << title << endl;
@@ -981,7 +981,7 @@ void CommandLineInterface::outputCompilationResults()
981
981
{
982
982
stringstream data;
983
983
m_compiler->streamAssembly (data, contract, m_sourceCodes, m_args.count (g_argAsmJson));
984
- createFile (contract + (m_args.count (g_argAsmJson) ? " _evm.json" : " .evm" ), data.str ());
984
+ createFile (m_compiler-> filesystemFriendlyName ( contract) + (m_args.count (g_argAsmJson) ? " _evm.json" : " .evm" ), data.str ());
985
985
}
986
986
else
987
987
{
0 commit comments