From ced0910d0837c1d073d85145f23772c7f209da5a Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 29 Feb 2008 19:37:02 -0500 Subject: Fixed empty buffer.filename bug in save_as(); core/file_io.lua --- core/file_io.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/file_io.lua b/core/file_io.lua index ed2b8c55..25fe2c0e 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -102,8 +102,8 @@ function save_as(buffer, filename) if not filename then filename = cocoa_dialog( 'filesave', { title = 'Save', - ['with-directory'] = buffer.filename:match('.+/'), - ['with-file'] = buffer.filename:match('[^/]+$'), + ['with-directory'] = (buffer.filename or ''):match('.+/'), + ['with-file'] = (buffer.filename or ''):match('[^/]+$'), ['no-newline'] = true } ) end -- cgit v1.2.3