From d46156258b18dc2494a301537d0a32274ea00967 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Wed, 23 May 2001 21:54:47 +0000 Subject: [PATCH] do_browser() - Don't shift the size of the file is it's less than 1K. Fixed files less than 1K being displayed as 0B (Rocco) git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@669 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 2 ++ files.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3b798ab3..e6dac68c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -49,6 +49,8 @@ Cvs code - do_browser() - Minor fixes to the processing of SELECT function (Rocco) - Added the "Goto Directory" code (Rocco) + - Don't shift the size of the file is it's less than 1K. Fixed + files less than 1K being displayed as 0B (Rocco). - global.c: - Updated some of the lists for the "Goto Directory" code (Rocco) - move.c: diff --git a/files.c b/files.c index 70f3e9ac..627045d2 100644 --- a/files.c +++ b/files.c @@ -1416,7 +1416,7 @@ char *do_browser(char *inpath) strcpy(foo + longest - 2, "--"); } else if (st.st_size < (1 << 10)) /* less than 1 K */ sprintf(foo + longest - 7, "%4d B", - (int) st.st_size >> 10); + (int) st.st_size); else if (st.st_size >= (1 << 30)) /* at least 1 gig */ sprintf(foo + longest - 7, "%4d GB", (int) st.st_size >> 30); -- 2.39.5