diff options
author | Kenneth Hsu <kennethhsu@gmail.com> | 2017-11-26 21:53:14 +0300 |
---|---|---|
committer | Kenneth Hsu <kennethhsu@gmail.com> | 2017-11-26 22:19:54 +0300 |
commit | 8810e0130d3857cadc9269367f0e80f6434b44af (patch) | |
tree | c28108b89bbea8510023b937f00ecee9c4bb517c /Duplicati/License | |
parent | 6f5709e0d35a9e5bcc6379c265ae50627fba5b82 (diff) |
Make string comparisons use ordinal (binary) sort rules.
These string comparisons should not be culture-aware.
Diffstat (limited to 'Duplicati/License')
-rw-r--r-- | Duplicati/License/LicenseEntry.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Duplicati/License/LicenseEntry.cs b/Duplicati/License/LicenseEntry.cs index d89bca6e9..dc3e87c43 100644 --- a/Duplicati/License/LicenseEntry.cs +++ b/Duplicati/License/LicenseEntry.cs @@ -57,7 +57,7 @@ namespace Duplicati.License if (!string.IsNullOrEmpty(urlfile) && System.IO.File.Exists(urlfile))
Url = System.IO.File.ReadAllText(urlfile).Trim();
License = System.IO.File.ReadAllText(licensefile);
- if (License.IndexOf("\r\n") < 0)
+ if (License.IndexOf("\r\n", StringComparison.Ordinal) < 0)
License = License.Replace("\n", "\r\n").Replace("\r", "\r\n");
if (Environment.NewLine != "\r\n")
License = License.Replace("\r\n", Environment.NewLine);
|