mirror of
				https://github.com/SimpleMobileTools/Simple-File-Manager.git
				synced 2025-06-05 22:09:15 +02:00 
			
		
		
		
	use "0 B" instead of 0 for empty files
This commit is contained in:
		| @@ -69,7 +69,7 @@ public class ItemsAdapter extends BaseAdapter { | ||||
|     private String getFormattedSize(FileDirItem item) { | ||||
|         final long size = item.getSize(); | ||||
|         if (size <= 0) | ||||
|             return "0"; | ||||
|             return "0 B"; | ||||
|         final String[] units = {"B", "kB", "MB", "GB", "TB"}; | ||||
|         final int digitGroups = (int) (Math.log10(size) / Math.log10(1024)); | ||||
|         return new DecimalFormat("#,##0.#").format(size / Math.pow(1024, digitGroups)) + " " + units[digitGroups]; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user