From c3e342a7defb80e594c5ff5f541be64d919e7f04 Mon Sep 17 00:00:00 2001 From: joten Date: Wed, 5 Dec 2012 13:50:30 +0100 Subject: [PATCH] fixed the processing of the command-line argument setting Main_appDir/Main_dataDir --- .hgignore | 1 + src/Main.ahk | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.hgignore b/.hgignore index 8487de8..27d4456 100644 --- a/.hgignore +++ b/.hgignore @@ -4,3 +4,4 @@ src/log.txt syntax: regexp .*[cC]onfig.*\.ini .+\.\w{3}~ +src/data/_.*.ini diff --git a/src/Main.ahk b/src/Main.ahk index 522dc56..89d6d20 100644 --- a/src/Main.ahk +++ b/src/Main.ahk @@ -33,9 +33,7 @@ SetWinDelay, 10 ;; Pseudo main function If 0 = 1 - Main_dataDir = %1% - Else - Main_dataDir = %A_ScriptDir% + Main_appDir = %1% Main_setup() @@ -153,7 +151,6 @@ Main_makeDir(dirName) { Main_setup() { Local winAppDir - Main_appDir := "" Main_logFile := "" Main_dataDir := "" Main_autoLayout := "" @@ -161,7 +158,8 @@ Main_setup() { EnvGet, winAppDir, APPDATA - Main_appDir := winAppDir . "\bug.n" + If Main_appDir = "" + Main_appDir := winAppDir . "\bug.n" Main_logFile := Main_appDir . "\bugn_log.txt" Main_dataDir := Main_appDir . "\data" Main_autoLayout := Main_dataDir . "\_Layout.ini"