aboutsummaryrefslogtreecommitdiff
path: root/plugins/lastproject.lua
diff options
context:
space:
mode:
authorlqdev <liquidekgaming@gmail.com>2020-12-06 16:57:30 +0100
committerGitHub <noreply@github.com>2020-12-06 16:57:30 +0100
commitac84d33ab234f1419b85028c735e1f970924abdb (patch)
tree600aa8c62c1b73e8dc5a143485dd8ea08a3c3db8 /plugins/lastproject.lua
parentde4227d55a5c821e3450554c952dfb3b1b192266 (diff)
parenteae34e5b7863bf5fa0db3bf133fb9b2b667266fd (diff)
downloadlite-xl-plugins-ac84d33ab234f1419b85028c735e1f970924abdb.tar.gz
lite-xl-plugins-ac84d33ab234f1419b85028c735e1f970924abdb.zip
Merge pull request #1 from rxi/master
Update from upstream
Diffstat (limited to 'plugins/lastproject.lua')
-rw-r--r--plugins/lastproject.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/lastproject.lua b/plugins/lastproject.lua
index 09ca507..5fb23bd 100644
--- a/plugins/lastproject.lua
+++ b/plugins/lastproject.lua
@@ -14,8 +14,10 @@ end
-- save current project path
local fp = io.open(last_project_filename, "w")
-fp:write(system.absolute_path ".")
-fp:close()
+if nil ~= fp then
+ fp:write(system.absolute_path ".")
+ fp:close()
+end
-- restart using last project path if we had no commandline arguments and could
@@ -24,3 +26,4 @@ if #ARGS == 1 and project_path then
system.exec(string.format("%s %q", EXEFILE, project_path))
core.quit(true)
end
+