diff --git a/BUGS b/BUGS index 918c9dc709a462098f07ea8cc2a71046c914d4f0..b671f1e7359f0d94a354b192688130e320b629b2 100644 --- a/BUGS +++ b/BUGS @@ -62,6 +62,9 @@ - Unable to cut the entire file using the marker (discovered by Kev Tyler) (42). [FIXED] - The keypad does not work when nano runs in the Gnome terminal (43). [FIXED] +- When reading in a file, if the file is a directory the contents of the + file being edited are blown away (discovered by Chris Pimlot) (44). [FIXED] + ** Open BUGS ** - Marked cutting sometimes leaves a newline in the file unintelligently, @@ -74,4 +77,3 @@ - totsize problems still abound in do_justify (33) $Id$ - diff --git a/ChangeLog b/ChangeLog index 982d757c542ae3dbe5d2d81408b2e52c97abd6c1..f0b9077ecdfd1e2f4068c7fa18333cc927d61345 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,9 @@ CVS code - do_cut_text() - Don't immediately abort if we're on filebot and the marker is set (fixes bug #42). +- files.c: + open_file() + - Fix for bug #44 (Rocco Corsi). - global.c: shortcut_init() - Added in FKEYs that for some reason were left out. *boggle* diff --git a/files.c b/files.c index 8a6cd9d277dec75883ea90a9d53edb5df2b65348..f06daa092228d913b89b00f69215bab6280352ab 100644 --- a/files.c +++ b/files.c @@ -228,7 +228,8 @@ int open_file(char *filename, int insert, int quiet) } else { /* File is A-OK */ if (S_ISDIR(fileinfo.st_mode)) { statusbar(_("File \"%s\" is a directory"), filename); - new_file(); + if (!insert) + new_file(); return -1; } if (!quiet)