Skip to content

Commit

Permalink
更新迁移根目录配置
Browse files Browse the repository at this point in the history
  • Loading branch information
Richasy committed Jun 29, 2024
1 parent 31b126a commit 82f2721
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Core/RodelAgent.Context/MigrationUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ private static async Task CheckDatabaseExistInternalAsync(string dbName, string
var targetDbPath = Path.Combine(workDir, dbName);
if (!File.Exists(targetDbPath))
{
var emptyDb = Path.Combine(_rootPath, "Assets", dbName);
var rootPath = string.IsNullOrEmpty(_rootPath) ? AppContext.BaseDirectory : _rootPath;
var emptyDb = Path.Combine(rootPath, "Assets", dbName);
await Task.Run(() => File.Copy(emptyDb, targetDbPath));
}
}
Expand Down

0 comments on commit 82f2721

Please sign in to comment.