Normalize global PATH from core.init
This commit is contained in:
parent
de1afb3391
commit
a2c4fdf649
|
@ -350,6 +350,12 @@ function core.init()
|
||||||
DocView = require "core.docview"
|
DocView = require "core.docview"
|
||||||
Doc = require "core.doc"
|
Doc = require "core.doc"
|
||||||
|
|
||||||
|
if PATHSEP == '\\' then
|
||||||
|
USERDIR = common.normalize_path(USERDIR)
|
||||||
|
DATADIR = common.normalize_path(DATADIR)
|
||||||
|
EXEDIR = common.normalize_path(EXEDIR)
|
||||||
|
end
|
||||||
|
|
||||||
do
|
do
|
||||||
local recent_projects, window_position = load_session()
|
local recent_projects, window_position = load_session()
|
||||||
if window_position then
|
if window_position then
|
||||||
|
@ -867,11 +873,12 @@ end
|
||||||
|
|
||||||
core.add_save_hook(function(filename)
|
core.add_save_hook(function(filename)
|
||||||
local doc = core.active_view.doc
|
local doc = core.active_view.doc
|
||||||
if doc and doc:is(Doc) and doc.filename == common.normalize_path(USERDIR .. PATHSEP .. "init.lua") then
|
if doc and doc:is(Doc) and doc.filename == USERDIR .. PATHSEP .. "init.lua" then
|
||||||
core.reload_module("core.style")
|
core.reload_module("core.style")
|
||||||
core.load_user_directory()
|
core.load_user_directory()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return core
|
return core
|
||||||
|
|
Loading…
Reference in New Issue