Skip to content

Commit

Permalink
DatabaseReplicator folder creation fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
impworks committed Jan 1, 2024
1 parent 48517ab commit c4dbbb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Bonsai/Data/Utils/DatabaseReplicator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static class DatabaseReplicator
/// </summary>
public static bool IsReplicationPending(ConnectionStringsConfig config)
{
if (config.UseEmbeddedDatabase == false || string.IsNullOrEmpty(config.Database) || string.IsNullOrEmpty(config.EmbeddedDatabase))
if (config.UseEmbeddedDatabase == false || string.IsNullOrEmpty(config.EmbeddedDatabase))
return false;

var pathMatch = Regex.Match(
Expand All @@ -31,7 +31,8 @@ public static bool IsReplicationPending(ConnectionStringsConfig config)
return false;

Directory.CreateDirectory(Path.GetDirectoryName(path));
return true;

return !string.IsNullOrEmpty(config.Database);
}

/// <summary>
Expand Down

0 comments on commit c4dbbb5

Please sign in to comment.