show '-' for entries without size
This commit is contained in:
1 parent
364ce8ea67
commit
62515e8a1b
1 file changed
+2
-1
+2
-1
@@ -329,6 +329,7 @@ void size_to_string(
|
|||||||
const char SIZE_CHARS[ 6 ] = { 'B', 'k', 'M', 'G', 'T', 'P' };
|
const char SIZE_CHARS[ 6 ] = { 'B', 'k', 'M', 'G', 'T', 'P' };
|
||||||
char size_quantifier = '\0';
|
char size_quantifier = '\0';
|
||||||
double size_format = ( float )entry->stats.st_size;
|
double size_format = ( float )entry->stats.st_size;
|
||||||
|
|
||||||
if ( entry->stats.st_mode & S_IFREG
|
if ( entry->stats.st_mode & S_IFREG
|
||||||
|| entry->stats.st_mode & S_IFCHR )
|
|| entry->stats.st_mode & S_IFCHR )
|
||||||
{
|
{
|
||||||
@@ -368,7 +369,7 @@ void size_to_string(
|
|||||||
snprintf(
|
snprintf(
|
||||||
&file_size[ 0 ],
|
&file_size[ 0 ],
|
||||||
length,
|
length,
|
||||||
" "
|
" -"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user