mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-08 20:41:59 +03:00
* screen.c (string_file_size): Don't display size of ".." - it
may take too much time to calculate it on VFS. Show "UP--DIR" instead. (string_file_size_brief): Remove ".." handling - it's now done in string_file_size(). Show "SUB-DIR" for links to directories, "SYMLINK" for other links.
This commit is contained in:
parent
adce2a295d
commit
894ed9dcc6
@ -1,3 +1,12 @@
|
||||
2002-01-20 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* screen.c (string_file_size): Don't display size of ".." - it
|
||||
may take too much time to calculate it on VFS. Show "UP--DIR"
|
||||
instead.
|
||||
(string_file_size_brief): Remove ".." handling - it's now done
|
||||
in string_file_size(). Show "SUB-DIR" for links to directories,
|
||||
"SYMLINK" for other links.
|
||||
|
||||
2002-01-17 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* cmd.c: Remove OS/2 specific code.
|
||||
|
15
src/screen.c
15
src/screen.c
@ -172,6 +172,12 @@ string_file_size (file_entry *fe, int len)
|
||||
{
|
||||
static char buffer [BUF_TINY];
|
||||
|
||||
/* Don't ever show size of ".." since we don't calculate it */
|
||||
if (!strcmp (fe->fname, "..")) {
|
||||
strcpy (buffer, N_("UP--DIR"));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
#ifdef HAVE_ST_RDEV
|
||||
if (S_ISBLK (fe->buf.st_mode) || S_ISCHR (fe->buf.st_mode))
|
||||
g_snprintf (buffer, sizeof (buffer), "%3d,%3d",
|
||||
@ -191,8 +197,13 @@ string_file_size_brief (file_entry *fe, int len)
|
||||
{
|
||||
static char buffer [BUF_TINY];
|
||||
|
||||
if (S_ISDIR (fe->buf.st_mode)){
|
||||
strcpy (buffer, _(strcmp (fe->fname, "..") ? N_("SUB-DIR") : N_("UP--DIR")));
|
||||
if (S_ISLNK (fe->buf.st_mode) && !fe->f.link_to_dir) {
|
||||
strcpy (buffer, N_("SYMLINK"));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
if ((S_ISDIR (fe->buf.st_mode) || fe->f.link_to_dir) && strcmp (fe->fname, "..")) {
|
||||
strcpy (buffer, N_("SUB-DIR"));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user