diff --git a/0012-on.initialize b/0012-on.initialize index ec64394..d3cec22 100644 --- a/0012-on.initialize +++ b/0012-on.initialize @@ -1,10 +1,11 @@ on.initialize = function(arg) - if #arg > 0 then - if is_absolute_path(arg[1]) then - Data_dir = arg[1] - else - Data_dir = App.current_dir..arg[1] - end + if #arg == 0 then + error('please provide a directory to browse') + end + if is_absolute_path(arg[1]) then + Data_dir = arg[1] + else + Data_dir = App.current_dir..arg[1] end print('reading articles from '..Data_dir) if not file_exists(Data_dir) then diff --git a/0152-Data_dir b/0152-Data_dir index e162e0a..d74ed21 100644 --- a/0152-Data_dir +++ b/0152-Data_dir @@ -1 +1 @@ -Data_dir = App.save_dir .. 'data' \ No newline at end of file +Data_dir = nil