Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

Renumber #393's migration to 34; no new strings

KnifeLemon0cd5f63e1ad6
diff --git a/src/Filee.Core/Settings/AppSettings.cs b/src/Filee.Core/Settings/AppSettings.cs
index 3df95d28..508c929c 100644
--- a/src/Filee.Core/Settings/AppSettings.cs
+++ b/src/Filee.Core/Settings/AppSettings.cs
@@ -112,7 +112,7 @@ public sealed class DonutSettings
public sealed class AppSettings
{
/// <summary>Current schema version. Increase when the format changes and add a migration.</summary>
- public const int CurrentSchemaVersion = 33;
+ public const int CurrentSchemaVersion = 34;
public int SchemaVersion { get; set; } = CurrentSchemaVersion;
diff --git a/src/Filee.Core/Settings/UserDataStore.cs b/src/Filee.Core/Settings/UserDataStore.cs
index d35ee148..df42d095 100644
--- a/src/Filee.Core/Settings/UserDataStore.cs
+++ b/src/Filee.Core/Settings/UserDataStore.cs
@@ -772,8 +772,8 @@ internal static class SettingsMigrations
changed = true;
}
}
- // v33: Lua scripts and CSS style sheets learn the text donut; custom claims stay put.
- if (from < 33)
+ // v34: Lua scripts and CSS style sheets learn the text donut; custom claims stay put.
+ if (from < 34)
changed |= LearnExtensions(profiles, out _, ["lua", "css"]);
return changed;
}
diff --git a/tests/Filee.Core.Tests/ScriptTextTests.cs b/tests/Filee.Core.Tests/ScriptTextTests.cs
index 0839cf28..ad482f63 100644
--- a/tests/Filee.Core.Tests/ScriptTextTests.cs
+++ b/tests/Filee.Core.Tests/ScriptTextTests.cs
@@ -15,7 +15,7 @@ public class ScriptTextTests
public void Scripts_and_style_sheets_are_text(string name) => Assert.Equal("txt", FormatRegistry.Detect(name)?.Id);
[Fact]
- public void Version_32_text_donuts_learn_them_without_taking_custom_claims()
+ public void Version_33_text_donuts_learn_them_without_taking_custom_claims()
{
var presets = BuiltInData.CreatePresets();
var profiles = BuiltInData.CreateProfiles();
@@ -23,11 +23,11 @@ public class ScriptTextTests
profile.Extensions.RemoveAll(e => e is "lua" or "css");
profiles.Insert(0, new ToolbarProfile { Id = "my-web", Name = "Web", Extensions = ["css"] });
- Assert.True(SettingsMigrations.ApplyToLibrary(32, presets, profiles));
+ Assert.True(SettingsMigrations.ApplyToLibrary(33, presets, profiles));
var text = profiles.Single(p => p.Id == "text").Extensions;
Assert.Contains("lua", text);
Assert.DoesNotContain("css", text); // the user's own donut has it
- Assert.False(SettingsMigrations.ApplyToLibrary(32, presets, profiles));
+ Assert.False(SettingsMigrations.ApplyToLibrary(33, presets, profiles));
}
}