diff options
author | 2016-11-12 15:27:22 +0100 | |
---|---|---|
committer | 2016-11-12 15:27:22 +0100 | |
commit | b73126e85ad059b37471e211209aaba47bf606d4 (patch) | |
tree | a6ec7e20727c6b2783e14f300a84be21b2f242de /plugins | |
parent | bf11bf6621181d9c87894bfbe3bc2f3fa9c62f94 (diff) |
added OPTION_HOMEPATH to point to read/write folder,for now used by LUA scripts (nw)
Copied all needed files so plugins could be started under UWP
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/timer/init.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/timer/init.lua b/plugins/timer/init.lua index 3f833b56eaa..c0f47836398 100644 --- a/plugins/timer/init.lua +++ b/plugins/timer/init.lua @@ -12,7 +12,8 @@ exports.author = { name = "Carl" } local timer = exports function timer.startplugin() - local timer_db = "timer/timer.db" + local dir = lfs.env_replace(manager:options().entries.homepath:value()) + local timer_db = dir .. "/timer/timer.db" local timer_started = false local total_time = 0 local start_time = 0 @@ -43,7 +44,7 @@ function timer.startplugin() save() end timer_started = true - lfs.mkdir('timer') + lfs.mkdir(dir .. '/timer') local db = assert(sqlite3.open(timer_db)) local found=false db:exec([[select * from sqlite_master where name='timer';]], function(...) found=true return 0 end) |