--- a/src/eric7/Globals/__init__.py Mon Jan 29 19:50:44 2024 +0100 +++ b/src/eric7/Globals/__init__.py Fri Feb 02 11:29:08 2024 +0100 @@ -197,7 +197,7 @@ """ if loc is None: if size < 1024: - return QCoreApplication.translate("Globals", "{0:4.2f} Bytes").format(size) + return QCoreApplication.translate("Globals", "{0:4d} Bytes").format(size) elif size < 1024 * 1024: size /= 1024 return QCoreApplication.translate("Globals", "{0:4.2f} KiB").format(size) @@ -211,9 +211,12 @@ size /= 1024 * 1024 * 1024 * 1024 return QCoreApplication.translate("Globals", "{0:4.2f} TiB").format(size) else: + if not isinstance(size, float): + size = float(size) + if size < 1024: return QCoreApplication.translate("Globals", "{0} Bytes").format( - loc.toString(size, "f", 2) + loc.toString(size) ) elif size < 1024 * 1024: size /= 1024