Skip to content

Commit

Permalink
Glob doesn't work in system call
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamSimpson committed Mar 1, 2018
1 parent 9f737d4 commit 744aa9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Client/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void write_context(websocket::stream<tcp::socket> &builder_stream, const ClientD

// If requested copy current context directory to context tmp
if(client_data.transfer_context) {
int cp_rc = bp::system("cp -r ./* " + context_temp_path);
int cp_rc = bp::system("cp -r . " + context_temp_path);
if(cp_rc != 0) {
throw std::runtime_error("Error copying build context");
}
Expand All @@ -310,7 +310,7 @@ void write_context(websocket::stream<tcp::socket> &builder_stream, const ClientD
bfs::copy_file(client_data.definition_path, context_temp_path + "/container.def");

// Tar context tmp directory to cb-context.tar.gz
auto original_pwd = bfs::current_path();
std::string original_pwd = bfs::current_path().string();
bfs::current_path(temp_path);
int tar_rc = bp::system("tar zcvf cb-context.tar.gz cb-context");
if(tar_rc != 0) {
Expand Down

0 comments on commit 744aa9b

Please sign in to comment.