Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Hsu <kennethhsu@gmail.com>2017-11-26 21:53:14 +0300
committerKenneth Hsu <kennethhsu@gmail.com>2017-11-26 22:19:54 +0300
commit8810e0130d3857cadc9269367f0e80f6434b44af (patch)
treec28108b89bbea8510023b937f00ecee9c4bb517c /Duplicati/Library/SQLiteHelper
parent6f5709e0d35a9e5bcc6379c265ae50627fba5b82 (diff)
Make string comparisons use ordinal (binary) sort rules.
These string comparisons should not be culture-aware.
Diffstat (limited to 'Duplicati/Library/SQLiteHelper')
-rw-r--r--Duplicati/Library/SQLiteHelper/DatabaseUpgrader.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Duplicati/Library/SQLiteHelper/DatabaseUpgrader.cs b/Duplicati/Library/SQLiteHelper/DatabaseUpgrader.cs
index f3a9a987a..994d7ed95 100644
--- a/Duplicati/Library/SQLiteHelper/DatabaseUpgrader.cs
+++ b/Duplicati/Library/SQLiteHelper/DatabaseUpgrader.cs
@@ -152,11 +152,11 @@ namespace Duplicati.Library.SQLiteHelper
{
//The resource name will be "Duplicati.GUI.Database_schema.1.Sample upgrade.sql"
//The number indicates the version that will be upgraded to
- if (s.StartsWith(prefix) && !s.Equals(prefix + SCHEMA_NAME))
+ if (s.StartsWith(prefix, StringComparison.Ordinal) && !s.Equals(prefix + SCHEMA_NAME))
{
try
{
- string version = s.Substring(prefix.Length, s.IndexOf(".", prefix.Length + 1) - prefix.Length);
+ string version = s.Substring(prefix.Length, s.IndexOf(".", prefix.Length + 1, StringComparison.Ordinal) - prefix.Length);
int fileversion = int.Parse(version);
string prev;