Netmash.Infrastructure.DatabaseMigration: GetScriptPacks fix
parent
1bc781d794
commit
e96dafe434
|
@ -75,7 +75,11 @@ namespace Netmash.Infrastructure.DatabaseMigration.Services
|
||||||
|
|
||||||
private ScriptPack[] GetScriptPacks()
|
private ScriptPack[] GetScriptPacks()
|
||||||
{
|
{
|
||||||
var scripts = Directory.GetDirectories(_configuration.ScriptsDirectory);
|
var scriptsPath = Directory.Exists(_configuration.ScriptsDirectory) ?
|
||||||
|
_configuration.ScriptsDirectory :
|
||||||
|
Path.Combine(Path.GetDirectoryName(Environment.ProcessPath), _configuration.ScriptsDirectory);
|
||||||
|
|
||||||
|
var scripts = Directory.GetDirectories(scriptsPath);
|
||||||
var packs = scripts.Select(z => new ScriptPack() { Path = z, Version = new Version(new DirectoryInfo(z).Name) });
|
var packs = scripts.Select(z => new ScriptPack() { Path = z, Version = new Version(new DirectoryInfo(z).Name) });
|
||||||
|
|
||||||
return packs.ToArray();
|
return packs.ToArray();
|
||||||
|
|
Loading…
Reference in New Issue