From 25f4e58ff4a1c055a3a5769579273cc1018febac Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sat, 25 Nov 2000 05:03:20 +0000 Subject: [PATCH] do_insertfile(): - Added call to real_name_from tilde, oops. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@319 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 2 ++ files.c | 6 +++++- po/nano.pot | 28 ++++++++++++++-------------- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0080aaa..5f3b56d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,8 @@ CVS code - - files.c: write_file() - Unsetting modified on temp files bug fixed (Rocco Corsi). + do_insertfile() + - Added call to real_name_from tilde, oops. - es.po: - Traditional Spanish strings updates. diff --git a/files.c b/files.c index 6290618a..2d17bf4e 100644 --- a/files.c +++ b/files.c @@ -245,6 +245,7 @@ int open_file(char *filename, int insert, int quiet) int do_insertfile(void) { int i; + char *realname = NULL; wrap_reset(); i = statusq(1, writefile_list, WRITEFILE_LIST_LEN, "", @@ -255,7 +256,10 @@ int do_insertfile(void) fprintf(stderr, "filename is %s", answer); #endif - i = open_file(answer, 1, 0); + realname = real_dir_from_tilde(answer); + + i = open_file(realname, 1, 0); + free(realname); dump_buffer(fileage); set_modified(); diff --git a/po/nano.pot b/po/nano.pot index 6995833d..20ab1cae 100644 --- a/po/nano.pot +++ b/po/nano.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-11-24 23:43-0500\n" +"POT-Creation-Date: 2000-11-25 00:01-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -51,63 +51,63 @@ msgstr "" msgid "Reading File" msgstr "" -#: files.c:251 +#: files.c:252 msgid "File to insert [from ./] " msgstr "" -#: files.c:276 files.c:301 files.c:509 nano.c:1373 +#: files.c:280 files.c:305 files.c:513 nano.c:1373 msgid "Cancelled" msgstr "" -#: files.c:331 files.c:352 files.c:366 files.c:383 files.c:389 +#: files.c:335 files.c:356 files.c:370 files.c:387 files.c:393 #, c-format msgid "Could not open file for writing: %s" msgstr "" -#: files.c:340 +#: files.c:344 msgid "Could not open file: Path length exceeded." msgstr "" -#: files.c:371 +#: files.c:375 #, c-format msgid "Wrote >%s\n" msgstr "" -#: files.c:398 +#: files.c:402 #, c-format msgid "Could not close %s: %s" msgstr "" #. Try a rename?? -#: files.c:419 files.c:430 files.c:435 +#: files.c:423 files.c:434 files.c:439 #, c-format msgid "Could not open %s for writing: %s" msgstr "" -#: files.c:441 +#: files.c:445 #, c-format msgid "Could not set permissions %o on %s: %s" msgstr "" -#: files.c:448 +#: files.c:452 #, c-format msgid "Wrote %d lines" msgstr "" -#: files.c:480 +#: files.c:484 msgid "File Name to write" msgstr "" -#: files.c:485 +#: files.c:489 #, c-format msgid "filename is %s" msgstr "" -#: files.c:498 +#: files.c:502 msgid "File exists, OVERWRITE ?" msgstr "" -#: files.c:986 +#: files.c:990 msgid "(more)" msgstr ""