Commit 2d8fb6cf authored by Nong Hoang Tu's avatar Nong Hoang Tu
Browse files

Fix the folder to program's location

parent 1a5b8f67
...@@ -63,7 +63,7 @@ proc initConfig*(config: var ProgConf): bool = ...@@ -63,7 +63,7 @@ proc initConfig*(config: var ProgConf): bool =
# Check if root folder of projects is available # Check if root folder of projects is available
if isEmptyOrWhitespace(rootFolder): if isEmptyOrWhitespace(rootFolder):
config.rootPath = dirName(os.getCurrentDir()) # TODO get folder of program instead config.rootPath = dirName(parentDir(paramStr(0)))
else: else:
config.rootPath = dirName(rootFolder) config.rootPath = dirName(rootFolder)
...@@ -71,7 +71,7 @@ proc initConfig*(config: var ProgConf): bool = ...@@ -71,7 +71,7 @@ proc initConfig*(config: var ProgConf): bool =
# TODO check or makeDir here # TODO check or makeDir here
let logDate = now().format("dd-MM-yyyy") let logDate = now().format("dd-MM-yyyy")
if isEmptyOrWhitespace(logFolder): if isEmptyOrWhitespace(logFolder):
config.logPath = dirName(os.getCurrentDir().dirName() & logDate) config.logPath = dirName(parentDir(paramStr(0)).dirName() & logDate)
else: else:
config.logPath = dirName(logFolder.dirName() & logDate) config.logPath = dirName(logFolder.dirName() & logDate)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment