From 10e03375644c58a2d06e213ba8b89ea10a2eaeee Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 5 Feb 2018 01:53:36 +0100 Subject: [PATCH] Do not list the size for empty filesystems --- src/plugins/volumes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/volumes.c b/src/plugins/volumes.c index fce16d4..ea289e4 100644 --- a/src/plugins/volumes.c +++ b/src/plugins/volumes.c @@ -539,7 +539,10 @@ static void _list_add(Volumes * volumes, char const * name, char const * device, f = fraction * 100; snprintf(buf, sizeof(buf), "%.1f%%", fraction * 100.0); } - _list_add_size(buf2, sizeof(buf2), bsize, total); + if(bsize > 0) + _list_add_size(buf2, sizeof(buf2), bsize, total); + else + buf2[0] = '\0'; _list_get_iter(volumes, &iter, mountpoint); pixbuf = _list_get_icon(volumes, dp, flags, mountpoint); gtk_list_store_set(volumes->store, &iter, DC_DEVICE, device,