mirror of
https://github.com/Radarr/Radarr
synced 2025-02-04 22:02:41 +00:00
Parse size to decimal using en-US culture.
This commit is contained in:
parent
2bf97fd76f
commit
91d3d522ec
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
@ -421,7 +422,8 @@ public static long GetReportSize(string sizeString)
|
|||
|
||||
if (match.Count != 0)
|
||||
{
|
||||
var value = Convert.ToDecimal(Regex.Replace(match[0].Groups["value"].Value, "\\,", ""));
|
||||
var cultureInfo = new CultureInfo("en-US");
|
||||
var value = Decimal.Parse(Regex.Replace(match[0].Groups["value"].Value, "\\,", ""), cultureInfo);
|
||||
|
||||
var unit = match[0].Groups["unit"].Value;
|
||||
|
||||
|
|
Loading…
Reference in a new issue