remember directory to browse across restart
This commit is contained in:
parent
b2785ac191
commit
2b0a3909a9
|
@ -1,11 +1,14 @@
|
|||
on.initialize = function(arg)
|
||||
if #arg == 0 then
|
||||
error('please provide a directory to browse')
|
||||
end
|
||||
if is_absolute_path(arg[1]) then
|
||||
Data_dir = arg[1]
|
||||
if Data_dir == nil then
|
||||
error('please provide a directory to browse')
|
||||
end
|
||||
else
|
||||
Data_dir = App.current_dir..arg[1]
|
||||
if is_absolute_path(arg[1]) then
|
||||
Data_dir = arg[1]
|
||||
else
|
||||
Data_dir = App.current_dir..arg[1]
|
||||
end
|
||||
end
|
||||
print('reading articles from '..Data_dir)
|
||||
if not file_exists(Data_dir) then
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
on.save_settings = function()
|
||||
return {}
|
||||
return {data_dir=Data_dir}
|
||||
end
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
on.load_settings = function(settings)
|
||||
Data_dir = settings.data_dir
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue