aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Updates/InstallationManager.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-01-30 16:57:15 +0100
committerGitHub <noreply@github.com>2019-01-30 16:57:15 +0100
commit1ea219bf3f5c0708c3afa5fa2d897ca5212b5e04 (patch)
treeb3478e7210659ef7fa1e305e814c188ffd152fea /Emby.Server.Implementations/Updates/InstallationManager.cs
parenta709cbdc64de36a1ce989636a19344af61d9026d (diff)
parentffcf6bdd3aaad5068decf84b0400e433fdb8323c (diff)
Merge branch 'master' into culture
Diffstat (limited to 'Emby.Server.Implementations/Updates/InstallationManager.cs')
-rw-r--r--Emby.Server.Implementations/Updates/InstallationManager.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs
index 44377a897..552155635 100644
--- a/Emby.Server.Implementations/Updates/InstallationManager.cs
+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs
@@ -555,7 +555,7 @@ namespace Emby.Server.Implementations.Updates
var packageChecksum = string.IsNullOrWhiteSpace(package.checksum) ? Guid.Empty : new Guid(package.checksum);
if (!packageChecksum.Equals(Guid.Empty)) // support for legacy uploads for now
{
- using (var stream = _fileSystem.OpenRead(tempFile))
+ using (var stream = File.OpenRead(tempFile))
{
var check = Guid.Parse(BitConverter.ToString(_cryptographyProvider.ComputeMD5(stream)).Replace("-", string.Empty));
if (check != packageChecksum)
@@ -570,12 +570,12 @@ namespace Emby.Server.Implementations.Updates
// Success - move it to the real target
try
{
- _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(target));
- _fileSystem.CopyFile(tempFile, target, true);
+ Directory.CreateDirectory(Path.GetDirectoryName(target));
+ File.Copy(tempFile, target, true);
//If it is an archive - write out a version file so we know what it is
if (isArchive)
{
- _fileSystem.WriteAllText(target + ".ver", package.versionStr);
+ File.WriteAllText(target + ".ver", package.versionStr);
}
}
catch (IOException ex)
@@ -611,7 +611,7 @@ namespace Emby.Server.Implementations.Updates
_logger.LogInformation("Deleting plugin file {0}", path);
// Make this case-insensitive to account for possible incorrect assembly naming
- var file = _fileSystem.GetFilePaths(_fileSystem.GetDirectoryName(path))
+ var file = _fileSystem.GetFilePaths(Path.GetDirectoryName(path))
.FirstOrDefault(i => string.Equals(i, path, StringComparison.OrdinalIgnoreCase));
if (!string.IsNullOrWhiteSpace(file))