File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -261,12 +261,13 @@ extension ProgressBar {
261261 private func adjustFormattedSize( _ size: String ) -> String {
262262 // Ensure we always have one digit after the decimal point to prevent flickering.
263263 let zero = Int64 ( 0 ) . formattedSize ( )
264- guard !size. contains ( " . " ) , let first = size. first, first. isNumber || !size. contains ( zero) else {
264+ let decimalSep = Locale . current. decimalSeparator ?? " . "
265+ guard !size. contains ( decimalSep) , let first = size. first, first. isNumber || !size. contains ( zero) else {
265266 return size
266267 }
267268 var size = size
268269 for unit in [ " MB " , " GB " , " TB " ] {
269- size = size. replacingOccurrences ( of: " \( unit) " , with: " . 0 \( unit) " )
270+ size = size. replacingOccurrences ( of: " \( unit) " , with: " \( decimalSep ) 0 \( unit) " )
270271 }
271272 return size
272273 }
You can’t perform that action at this time.
0 commit comments