Fixed an issue where docker users were not properly backing up the database. Removed an empty File for when covers/ had nothing in it. (#692)

This commit is contained in:
Joseph Milazzo 2021-10-19 08:35:52 -07:00 committed by GitHub
parent 9d84bfca5f
commit 6fb01eefa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 15 deletions

View file

@ -41,12 +41,13 @@ namespace Kavita.Common.EnvironmentInfo
break;
}
}
}
public OsInfo(IEnumerable<IOsVersionAdapter> versionAdapters)
{
OsVersionModel osInfo = null;
foreach (var osVersionAdapter in versionAdapters.Where(c => c.Enabled))
{
try
@ -57,13 +58,13 @@ namespace Kavita.Common.EnvironmentInfo
{
Console.WriteLine("Couldn't get OS Version info: " + e.Message);
}
if (osInfo != null)
{
break;
}
}
if (osInfo != null)
{
Name = osInfo.Name;
@ -75,7 +76,7 @@ namespace Kavita.Common.EnvironmentInfo
Name = Os.ToString();
FullName = Name;
}
if (IsLinux && File.Exists("/proc/1/cgroup") && File.ReadAllText("/proc/1/cgroup").Contains("/docker/"))
{
IsDocker = true;
@ -145,4 +146,4 @@ namespace Kavita.Common.EnvironmentInfo
LinuxMusl,
Bsd
}
}
}