From bf764fdfbea3a5c22bc42f3da44350cfbfca4e0b Mon Sep 17 00:00:00 2001 From: AdamSimpson Date: Wed, 28 Feb 2018 19:43:24 -0500 Subject: [PATCH] Don't cd in system call --- Client/src/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Client/src/main.cpp b/Client/src/main.cpp index b3d5e75..b7777df 100644 --- a/Client/src/main.cpp +++ b/Client/src/main.cpp @@ -302,10 +302,12 @@ void write_context(websocket::stream &builder_stream, const ClientD // Copy definition file, renaming it to container.def bfs::copy_file(client_data.definition_path, context_temp_path + "/container.def"); - Logger::debug("Copied definition: " + client_data.definition_path); // Tar context tmp directory to cb-context.tar.gz - bp::system("cd " + temp_path + "&& tar zcvf cb-context.tar.gz cb_context"); + auto original_pwd = bfs::current_path(); + bfs::current_path(temp_path); + bp::system("tar zcvf cb-context.tar.gz cb_context"); + bfs::current_path(original_pwd); Logger::debug("Created tarball of context directory"); // Transfer context tar