Skip to content

The Free Software Media System - Server Backend & API

Backport pull request #15054 from jellyfin/release-10.11.z

Shadowghostcee16d47cb51
diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs
index c9630b8945..1510e537d3 100644
--- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs
+++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs
@@ -152,6 +152,10 @@ namespace Emby.Server.Implementations.IO
/// <inheritdoc />
public void MoveDirectory(string source, string destination)
{
+ // Make sure parent directory of target exists
+ var parent = Directory.GetParent(destination);
+ parent?.Create();
+
try
{
Directory.Move(source, destination);