mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-05 14:25:17 -04:00
Fixed a migration issue on docker happening too many times or throwing exception when source wasn't there. (#719)
This commit is contained in:
@@ -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 */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user