From b73126e85ad059b37471e211209aaba47bf606d4 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 12 Nov 2016 15:27:22 +0100 Subject: 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 --- plugins/timer/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins') 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) -- cgit v1.2.3-70-g09d2