Drop the migration from the older folder
Nothing has shipped, so there is nothing to migrate: the program makes Documents/N1MM Logger+ and starts there. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
@@ -62,36 +62,4 @@ public class UserPathsTests : IDisposable
|
||||
|
||||
Assert.Equal(Path.Combine(root, "Nonemm", "settings.json"), paths.SettingsFile);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AnOlderVersionsFilesAreCopiedInOnce()
|
||||
{
|
||||
string older = Path.Combine(root, "older");
|
||||
Directory.CreateDirectory(Path.Combine(older, "Databases"));
|
||||
File.WriteAllText(Path.Combine(older, "Databases", "om5m.s3db"), "log");
|
||||
string database = Path.Combine(older, "Databases", "om5m.s3db");
|
||||
new Settings { DatabasePath = database }.Save(Path.Combine(older, "settings.json"));
|
||||
UserPaths paths = new(Path.Combine(root, "new"));
|
||||
paths.CreateFolders();
|
||||
|
||||
Assert.True(paths.AdoptOlderFiles(older));
|
||||
|
||||
Assert.Equal("log", File.ReadAllText(Path.Combine(paths.Databases, "om5m.s3db")));
|
||||
// the log that was opened is the log that was brought over
|
||||
Assert.Equal(
|
||||
Path.Combine(paths.Databases, "om5m.s3db"),
|
||||
Settings.Load(paths.SettingsFile).DatabasePath);
|
||||
Assert.False(paths.AdoptOlderFiles(older));
|
||||
// the older folder is left as it was
|
||||
Assert.True(File.Exists(database));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void NothingIsCopiedWhenThereIsNoOlderFolder()
|
||||
{
|
||||
UserPaths paths = new(root);
|
||||
paths.CreateFolders();
|
||||
|
||||
Assert.False(paths.AdoptOlderFiles(Path.Combine(root, "nowhere")));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user