Skip to content

Commit 23a8348

Browse files
committed
handle absolute paths in TasksDb
1 parent 4099fe2 commit 23a8348

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

MyApp.ServiceInterface/AppData.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,9 @@ public IDbConnection OpenAiTaskDb(DateTime? createdDate=null)
13621362
if (!OrmLiteConnectionFactory.NamedConnections.ContainsKey(monthDb))
13631363
{
13641364
var path = Config.TaskConnection.RightPart('=').LastLeftPart(';');
1365-
var dir = ContentRootPath.CombineWith(path.LastLeftPart('/'));
1365+
var dir = (path.StartsWith('/')
1366+
? path
1367+
: ContentRootPath.CombineWith(path)).LastLeftPart('/');
13661368
dir.AssertDir();
13671369
var connString = Config.TaskConnection.Replace("{db}", monthDb);
13681370
dbFactory.RegisterConnection(monthDb, connString, SqliteConfiguration.Configure(SqliteDialect.Create()));

0 commit comments

Comments
 (0)