mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-04 18:24:35 +00:00
Moved temporary files into a folder of their own below the data directory (#1245)
This commit is contained in:
1 parent
ddfc632b63
commit
12d3e1ec6c
52 files changed
+1219
-396
No files matched your search
+3
@@ -7,8 +7,11 @@ internal sealed class IndexStoreDesignTimeDbContextFactory : IDesignTimeDbContex
|
||||
public IndexStoreDbContext CreateDbContext(string[] args)
|
||||
{
|
||||
var databasePath = args.FirstOrDefault(argument => argument.EndsWith(".sqlite3", StringComparison.OrdinalIgnoreCase));
|
||||
// Only dotnet ef runs this, while it creates a migration, so neither AI Studio nor its data directory is there:
|
||||
#pragma warning disable MWAIS0019
|
||||
if (string.IsNullOrWhiteSpace(databasePath))
|
||||
databasePath = Path.Combine(Path.GetTempPath(), "mindwork-ai-studio-rag-index-design.sqlite3");
|
||||
#pragma warning restore MWAIS0019
|
||||
|
||||
return new IndexStoreDbContext(IndexStoreDbContext.CreateOptions(databasePath));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user