mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-15 01:48:27 +00:00
Improved how AI Studio saves its files (#1201)
This commit is contained in:
1 parent
b7255694cd
commit
dc97db256e
24 files changed
+626
-258
No files matched your search
@@ -102,9 +102,10 @@ public sealed class SettingsStorageTests
|
||||
// Every store writes its settings next to the previous ones and renames afterwards. The
|
||||
// temporary file carries a name of its own, so two stores cannot collide over it -- but a
|
||||
// store which gave up halfway would leave one lying around, and the next start would find
|
||||
// a configuration directory filling up with them.
|
||||
// a configuration directory filling up with them. The pattern covers the names of AtomicFile,
|
||||
// ending in ".tmp", and the earlier ones, ending in ".tmp-" and a GUID.
|
||||
//
|
||||
var leftovers = Directory.GetFiles(this.testDirectory, "*.tmp-*").Select(Path.GetFileName).ToList();
|
||||
var leftovers = Directory.GetFiles(this.testDirectory, "*.tmp*").Select(Path.GetFileName).ToList();
|
||||
Assert.That(leftovers, Is.Empty, $"Temporary settings files were left behind: {string.Join(", ", leftovers)}.");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user