소스 검색

Merge pull request #7525 from 1337joe/fix-duplicate-library-media-paths

Cody Robibero 3 년 전
부모
커밋
bebe1808ce
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      Emby.Server.Implementations/Library/LibraryManager.cs

+ 3 - 1
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;