From 8369c6be41d95106a41feb9b0aab183adff4128c Mon Sep 17 00:00:00 2001 From: kartikdutt18 Date: Tue, 26 May 2020 20:27:46 +0530 Subject: [PATCH] Print Path in windows for debugging Print Path in windows for debugging Print Path in windows for debugging Stip components of tar Stip components of tar --- utils/utils.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utils/utils.hpp b/utils/utils.hpp index 3737bb09..da12371a 100644 --- a/utils/utils.hpp +++ b/utils/utils.hpp @@ -67,7 +67,10 @@ class Utils command = "tar --force-local -xvzf " + boost::filesystem::current_path().string() + "\\" + - pathToArchiveTemp; + pathToArchiveTemp + " -C " + + boost::filesystem::current_path().string() + "\\" + + pathForExtractionTemp + " --strip-components=1"; + std::cout << command << " \n " << boost::filesystem::current_path().string(); #else command = command + boost::filesystem::current_path().string() + "/" + pathToArchive + " -C " + boost::filesystem::current_path().string() + @@ -200,7 +203,7 @@ class Utils // Extract Files. if (zipFile) { - Utils::ExtractFiles(downloadPath, "./../data/"); + Utils::ExtractFiles(downloadPath, pathForExtraction); } return 0;