diff --git a/src/ChangeLog b/src/ChangeLog index a20447b8b..66c061f6f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-02-11 Roland Illig + + * screen.c (string_file_name): Fixed the displaying of long file + names. The bug had been introduced by me on 2005-02-08. + * screen.c (string_file_nlinks): Likewise. + 2005-02-08 Roland Illig * dialog.c: Marked unused parameters. Now dlg_broadcast_msg_to diff --git a/src/screen.c b/src/screen.c index cbe3eeaab..c7c33fda8 100644 --- a/src/screen.c +++ b/src/screen.c @@ -180,9 +180,11 @@ string_file_name (file_entry *fe, char *buffer, size_t bufsize) { size_t i; char c; + const char *fe_fname_trunc; + fe_fname_trunc = name_trunc (fe->fname, bufsize - 1); for (i = 0; i < bufsize - 1; i++) { - c = fe->fname[i]; + c = fe_fname_trunc[i]; if (!c) break; if (!is_printable(c)) @@ -339,7 +341,7 @@ string_file_perm_octal (file_entry *fe, char *buffer, size_t bufsize) static void string_file_nlinks (file_entry *fe, char *buffer, size_t bufsize) { - g_snprintf (buffer, bufsize, "%16d", (int) fe->st.st_nlink); + g_snprintf (buffer, bufsize, "%d", (int) fe->st.st_nlink); } /* inode */