diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index a9428ae9b..d6754ad4a 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2840,10 +2840,12 @@ namespace Emby.Server.Implementations.Library var existingNameCount = 1; // first numbered name will be 2 var virtualFolderPath = Path.Combine(rootFolderPath, name); + var originalName = name; while (Directory.Exists(virtualFolderPath)) { existingNameCount++; - virtualFolderPath = Path.Combine(rootFolderPath, name + " " + existingNameCount); + name = originalName + existingNameCount; + virtualFolderPath = Path.Combine(rootFolderPath, name); } var mediaPathInfos = options.PathInfos;