From 85404469a4cf96f6d8de14bca21b418f047f9840 Mon Sep 17 00:00:00 2001 From: albertzeyer Date: Sun, 26 Jul 2009 09:38:34 +0000 Subject: [PATCH] fixed setting up binary_dir (important for searchpath system) git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@179 4df4b0f3-56ce-47cb-b001-ed939b7d65a6 --- src/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3cdab500b..bb04265f2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -122,14 +122,18 @@ int main(int argc, char *argv[]) banner(); // Intro on the text-console. if(argc >= 1) { + binary_dir = argv[0]; size_t slashpos = findLastPathSep(binary_dir); if(slashpos != std::string::npos) { binary_dir.erase(slashpos); binary_dir = SystemNativeToUtf8(binary_dir); } else - binary_dir = "."; - } else + binary_dir = "."; + } else { + warnings << "Binary-argument not given, assuming current dir" << endl; binary_dir = "."; + } + binary_dir = GetAbsolutePath(binary_dir); InitSearchPaths();