aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-11-08 21:38:01 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2011-11-08 21:38:01 -0500
commita19d97e359f75f7cad48c6f135f1ded5b0f0f71c (patch)
tree4b89cef145abe371b72b7eee561480ab586eea56
parentede8094d53063672b5844389f1c8fb32c33a8d90 (diff)
downloadtextadept-a19d97e359f75f7cad48c6f135f1ded5b0f0f71c.tar.gz
textadept-a19d97e359f75f7cad48c6f135f1ded5b0f0f71c.zip
Fixed bug with opening files in current dir from command line; core/file_io.lua
Thanks to Travis Herrick.
-rw-r--r--core/file_io.lua2
1 files changed, 1 insertions, 1 deletions
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