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

Print the canonical path of wasm/abi when not found #6346

Merged
merged 2 commits into from
Nov 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions programs/cleos/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2468,9 +2468,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 @@ -2523,8 +2521,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