mirror of
https://github.com/Radarr/Radarr
synced 2024-12-24 17:01:38 +00:00
elq dll path setting for mono.
This commit is contained in:
parent
2903d5d581
commit
620dc2d086
2 changed files with 15 additions and 1 deletions
|
@ -22,7 +22,13 @@ public EloqueraDbFactory(EnvironmentProvider environmentProvider)
|
||||||
|
|
||||||
public EloqueraDb CreateMemoryDb()
|
public EloqueraDb CreateMemoryDb()
|
||||||
{
|
{
|
||||||
|
if (EnvironmentProvider.IsMono)
|
||||||
|
{
|
||||||
|
return InternalCreate("server=(local);password=;options=inmemory", Guid.NewGuid().ToString());
|
||||||
|
|
||||||
|
}
|
||||||
return InternalCreate("server=(local);password=;options=inmemory;uselocalpath=" + dllPath, Guid.NewGuid().ToString());
|
return InternalCreate("server=(local);password=;options=inmemory;uselocalpath=" + dllPath, Guid.NewGuid().ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public EloqueraDb Create(string dbPath = null)
|
public EloqueraDb Create(string dbPath = null)
|
||||||
|
@ -34,9 +40,17 @@ public EloqueraDb Create(string dbPath = null)
|
||||||
|
|
||||||
var file = new FileInfo(dbPath);
|
var file = new FileInfo(dbPath);
|
||||||
|
|
||||||
|
if (EnvironmentProvider.IsMono)
|
||||||
|
{
|
||||||
|
return InternalCreate(string.Format("server=(local);password=;usedatapath={0}", file.Directory.FullName), file.Name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return InternalCreate(string.Format("server=(local);password=;usedatapath={0};uselocalpath={1}", file.Directory.FullName, dllPath), file.Name);
|
return InternalCreate(string.Format("server=(local);password=;usedatapath={0};uselocalpath={1}", file.Directory.FullName, dllPath), file.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private EloqueraDb InternalCreate(string connectionString, string databaseName)
|
private EloqueraDb InternalCreate(string connectionString, string databaseName)
|
||||||
{
|
{
|
||||||
var db = new DB(connectionString);
|
var db = new DB(connectionString);
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue