Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #6346 from conr2d/contract-path
Browse files Browse the repository at this point in the history
Print the canonical path of wasm/abi when not found
  • Loading branch information
heifner authored Nov 20, 2018
2 parents 32bea70 + 1641618 commit a37d1bd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions programs/cleos/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2476,9 +2476,7 @@ int main( int argc, char** argv ) {
bytes code_bytes;
if(!contract_clear){
std::string wasm;
fc::path cpath(contractPath);

if( cpath.filename().generic_string() == "." ) cpath = cpath.parent_path();
fc::path cpath = fc::canonical(fc::path(contractPath));

if( wasmPath.empty() )
wasmPath = (cpath / (cpath.filename().generic_string()+".wasm")).generic_string();
Expand Down Expand Up @@ -2531,8 +2529,7 @@ int main( int argc, char** argv ) {

bytes abi_bytes;
if(!contract_clear){
fc::path cpath(contractPath);
if( cpath.filename().generic_string() == "." ) cpath = cpath.parent_path();
fc::path cpath = fc::canonical(fc::path(contractPath));

if( abiPath.empty() ) {
abiPath = (cpath / (cpath.filename().generic_string()+".abi")).generic_string();
Expand Down

0 comments on commit a37d1bd

Please sign in to comment.