Fixed a migration issue on docker happening too many times or throwing exception when source wasn't there. (#719)
This commit is contained in:
parent
53bb1af21b
commit
18c2cdf6ef
4 changed files with 19 additions and 7 deletions
|
|
@ -39,6 +39,12 @@ namespace API.Data
|
|||
|
||||
if (isDocker)
|
||||
{
|
||||
if (Configuration.LogPath.Contains("config"))
|
||||
{
|
||||
Console.WriteLine("Migration to config/ not needed");
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine(
|
||||
"Migrating files from pre-v0.4.8. All Kavita config files are now located in config/");
|
||||
|
||||
|
|
@ -112,8 +118,16 @@ namespace API.Data
|
|||
{
|
||||
if (new DirectoryInfo(Path.Join(ConfigDirectory, folderToMove)).Exists) continue;
|
||||
|
||||
DirectoryService.CopyDirectoryToDirectory(Path.Join(Directory.GetCurrentDirectory(), folderToMove),
|
||||
Path.Join(ConfigDirectory, folderToMove));
|
||||
try
|
||||
{
|
||||
DirectoryService.CopyDirectoryToDirectory(
|
||||
Path.Join(Directory.GetCurrentDirectory(), folderToMove),
|
||||
Path.Join(ConfigDirectory, folderToMove));
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
/* Swallow Exception */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue