From cfa2c9cf523ced748d8fde3bbdb8cce613309f03 Mon Sep 17 00:00:00 2001 From: Phitherek Date: Wed, 26 Sep 2012 20:36:22 +0200 Subject: [PATCH] added going back to main repo directory after mod installation --- 3m.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/3m.cpp b/3m.cpp index 0f11880..09ee035 100644 --- a/3m.cpp +++ b/3m.cpp @@ -1560,6 +1560,11 @@ if(argv[1][1] == 'S') { instpath = sinstpath.str(); tmprid.path = instpath; repoinfo.push_back(tmprid); + ret = chdir(".."); + if(ret == -1) { + cerr << "Could not chdir one level up: " << strerror(errno) << endl; + return EXIT_FAILURE; + } } cout << actionv[i].name << " installed successfully!" << endl; }