From a19d97e359f75f7cad48c6f135f1ded5b0f0f71c Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 8 Nov 2011 21:38:01 -0500 Subject: Fixed bug with opening files in current dir from command line; core/file_io.lua Thanks to Travis Herrick. --- core/file_io.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/file_io.lua b/core/file_io.lua index 2a1385bc..3625e46d 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -162,7 +162,7 @@ function open_file(utf8_filenames) if file == utf8_filename then table.remove(recent_files, i) break end end table.insert(recent_files, 1, utf8_filename) - lfs.chdir(utf8_filename:iconv('UTF-8', _CHARSET):match('.+[/\\]')) + lfs.chdir(utf8_filename:iconv('UTF-8', _CHARSET):match('.+[/\\]') or '.') end end -- cgit v1.2.3