Restrict replacement to the end of the string

This commit is contained in:
tcely authored and GitHub committed 2025-01-25 05:20:14 -05:00
1 parent 42bf4d2aac
commit aa493208e2
1 file changed
+1 -1
+1 -1
View File
@@ -10,5 +10,5 @@ def bytesformat(input):
output = filesizeformat(input)
if not (output and output.endswith('B')):
return output
return output.replace('B', 'iB')
return output.replace('B', 'iB', -1)