From 744aa9bda74f0ef1ca9895178b1b114718b4a79f Mon Sep 17 00:00:00 2001 From: AdamSimpson Date: Wed, 28 Feb 2018 22:07:51 -0500 Subject: [PATCH] Glob doesn't work in system call --- Client/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Client/src/main.cpp b/Client/src/main.cpp index 33bbf66..41ec0c0 100644 --- a/Client/src/main.cpp +++ b/Client/src/main.cpp @@ -299,7 +299,7 @@ void write_context(websocket::stream &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"); } @@ -310,7 +310,7 @@ void write_context(websocket::stream &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) {