aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-09-28 15:23:08 -0400
committerGitHub <noreply@github.com>2019-09-28 15:23:08 -0400
commit427d52cf9ad5cb0df90e0deafd766f9cbd0e8449 (patch)
tree42fe82bb2233cd5e9c8b9acaab26ac3beac1db19
parent3577ef68141aa6e3c710b51afab34b9ce97b8b3a (diff)
parent06d420f7436c9903737e68c6f0688b4033364ffb (diff)
Merge pull request #1805 from Bond-009/plugin_fix
Fix plugin installation
-rw-r--r--Emby.Server.Implementations/Updates/InstallationManager.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs
index 7947edeeb..0c0c77cda 100644
--- a/Emby.Server.Implementations/Updates/InstallationManager.cs
+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
+using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
@@ -457,13 +458,17 @@ namespace Emby.Server.Implementations.Updates
var hash = ToHexString(md5.ComputeHash(stream));
if (!string.Equals(package.checksum, hash, StringComparison.OrdinalIgnoreCase))
{
- _logger.LogDebug("{0}, {1}", package.checksum, hash);
- throw new InvalidDataException($"The checksums didn't match while installing {package.name}.");
+ _logger.LogError(
+ "The checksums didn't match while installing {Package}, expected: {Expected}, got: {Received}",
+ package.name,
+ package.checksum,
+ hash);
+ throw new InvalidDataException("The checksum of the received data doesn't match.");
}
if (Directory.Exists(targetDir))
{
- Directory.Delete(targetDir);
+ Directory.Delete(targetDir, true);
}
stream.Position = 0;