1
1

Added code to check to see if using -l and the file is not fact a link. Please test

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@111 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
Chris Allegretta 2000-07-21 22:42:46 +00:00
родитель 8f6c069543
Коммит acb6234263
4 изменённых файлов: 25 добавлений и 14 удалений

2
BUGS
Просмотреть файл

@ -28,7 +28,7 @@
- If nano opens a read-only file with the --tempfile option, and a change
is made to the buffer, and a write is attempted, nano will not give you
a dialog about not being able to write the file, and it will not let the
user exit (29, discovered by Joshua Jensen) [FIXED mostly]
user exit (29, discovered by Joshua Jensen) [FIXED]
** Open BUGS **

Просмотреть файл

@ -21,6 +21,12 @@ Current CVS:
read_file():
- Added init of buf variable, hopefully this will stop the
"bleeding" of text seen with mutt and using i18n.
write_file():
- Added code to check to see if using -l and the file is not
in fact a link. This should fix the behavior where a file
that does not have write permission but could be removed and
rewritten is saved without error. Please test this feature
and give feedback.
- search.c:
search_init():
- Added " (to replace)" statement to end of search string if

Просмотреть файл

@ -300,8 +300,13 @@ int write_file(char *name, int tmp)
fileptr = fileage;
/* Check to see if the file is a regular file and FOLLOW_SYMLINKS is
set. If so then don't do the delete and recreate code which would
cause unexpected behavior */
lstat(name, &st);
/* Open the file and truncate it. Trust the symlink. */
if (ISSET(FOLLOW_SYMLINKS) && !tmp) {
if ((ISSET(FOLLOW_SYMLINKS) || !S_ISLNK(st.st_mode)) && !tmp) {
/*
* If TEMP_OPT == 1, check to see if we can append to the file
* first, i.e. to see if we can at least write to the file (stops

Просмотреть файл

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2000-07-18 21:16-0400\n"
"POT-Creation-Date: 2000-07-21 18:43-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -55,55 +55,55 @@ msgstr ""
msgid "File to insert [from ./] "
msgstr ""
#: files.c:272 files.c:296 files.c:483 nano.c:1147
#: files.c:272 files.c:296 files.c:488 nano.c:1147
msgid "Cancelled"
msgstr ""
#: files.c:326 files.c:346 files.c:359 files.c:376 files.c:382
#: files.c:331 files.c:351 files.c:364 files.c:381 files.c:387
#, c-format
msgid "Could not open file for writing: %s"
msgstr ""
#: files.c:334
#: files.c:339
msgid "Could not open file: Path length exceeded."
msgstr ""
#: files.c:364
#: files.c:369
#, c-format
msgid "Wrote >%s\n"
msgstr ""
#: files.c:391
#: files.c:396
#, c-format
msgid "Could not close %s: %s"
msgstr ""
#. Try a rename??
#: files.c:412 files.c:423 files.c:428
#: files.c:417 files.c:428 files.c:433
#, c-format
msgid "Could not open %s for writing: %s"
msgstr ""
#: files.c:434
#: files.c:439
#, c-format
msgid "Could not set permissions %o on %s: %s"
msgstr ""
#: files.c:441
#: files.c:446
#, c-format
msgid "Wrote %d lines"
msgstr ""
#: files.c:462
#: files.c:467
msgid "File Name to write"
msgstr ""
#: files.c:467
#: files.c:472
#, c-format
msgid "filename is %s"
msgstr ""
#: files.c:472
#: files.c:477
msgid "File exists, OVERWRITE ?"
msgstr ""