Fixing favorites as nil issue
This commit is contained in:
parent
43a2051319
commit
546cc6ad5c
4
stubb
4
stubb
|
@ -5,7 +5,7 @@ local socket = require("socket")
|
|||
local urlparser = require("socket.url")
|
||||
local separator = '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n'
|
||||
local valid_types = {'0', '1', 'i'}
|
||||
session = { tabs = { } }
|
||||
session = { tabs = { }, favorites = {} }
|
||||
local save_file_location = string.format('%s/.stubbfaves', assert(os.getenv('HOME'), 'Unable to get home directory'))
|
||||
|
||||
|
||||
|
@ -399,7 +399,7 @@ end
|
|||
|
||||
function save_file()
|
||||
local t = session.tabs[session.current_tab]
|
||||
if not t.filedata then return print('No file available. Save canceled.') end
|
||||
if not t.filedata then return print('No file available. Save cancelled.') end
|
||||
local homedir = assert(os.getenv('HOME'), 'Unable to find home directory')
|
||||
io.write('Enter the filename to save as (! to cancel): ' .. homedir .. '/')
|
||||
local filename = io.read()
|
||||
|
|
Loading…
Reference in New Issue