From 5f7d04334f049806cbdd0197a4d7b538578c37d7 Mon Sep 17 00:00:00 2001 From: Sude Date: Fri, 19 Sep 2014 23:07:16 +0300 Subject: [PATCH] Use current directory if directory wasn't specified --- main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.cpp b/main.cpp index b136d1a..fe460e6 100644 --- a/main.cpp +++ b/main.cpp @@ -325,8 +325,14 @@ int main(int argc, char *argv[]) // Make sure that directory has trailing slash if (!config.sDirectory.empty()) + { if (config.sDirectory.at(config.sDirectory.length()-1)!='/') config.sDirectory += "/"; + } + else + { + config.sDirectory = "./"; // Directory wasn't specified, use current directory + } if (!unrecognized_options_cfg.empty() && (!config.bSaveConfig || !config.bResetConfig)) {