require the argument
This commit is contained in:
parent
459b1df08a
commit
b2785ac191
|
@ -1,10 +1,11 @@
|
||||||
on.initialize = function(arg)
|
on.initialize = function(arg)
|
||||||
if #arg > 0 then
|
if #arg == 0 then
|
||||||
if is_absolute_path(arg[1]) then
|
error('please provide a directory to browse')
|
||||||
Data_dir = arg[1]
|
end
|
||||||
else
|
if is_absolute_path(arg[1]) then
|
||||||
Data_dir = App.current_dir..arg[1]
|
Data_dir = arg[1]
|
||||||
end
|
else
|
||||||
|
Data_dir = App.current_dir..arg[1]
|
||||||
end
|
end
|
||||||
print('reading articles from '..Data_dir)
|
print('reading articles from '..Data_dir)
|
||||||
if not file_exists(Data_dir) then
|
if not file_exists(Data_dir) then
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Data_dir = App.save_dir .. 'data'
|
Data_dir = nil
|
||||||
|
|
Loading…
Reference in New Issue