Fix plugin old version cleanup

This commit is contained in:
Odd Stråbø 2020-11-19 15:41:58 +01:00
parent 49ebbcf87e
commit f8dd50fc1a

View File

@ -1070,7 +1070,6 @@ namespace Emby.Server.Implementations
if (!string.IsNullOrEmpty(lastName) && cleanup)
{
// Attempt a cleanup of old folders.
versions.RemoveAt(x);
try
{
Logger.LogDebug("Deleting {Path}", versions[x].Path);
@ -1080,6 +1079,8 @@ namespace Emby.Server.Implementations
{
Logger.LogWarning(e, "Unable to delete {Path}", versions[x].Path);
}
versions.RemoveAt(x);
}
}