diff options
Diffstat (limited to 'Jellyfin.Api/Controllers/LibraryStructureController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/LibraryStructureController.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/LibraryStructureController.cs b/Jellyfin.Api/Controllers/LibraryStructureController.cs index e4833c77dd..65bfe25d21 100644 --- a/Jellyfin.Api/Controllers/LibraryStructureController.cs +++ b/Jellyfin.Api/Controllers/LibraryStructureController.cs @@ -183,15 +183,11 @@ public class LibraryStructureController : BaseJellyfinApiController var tempPath = Path.Combine( rootFolderPath, Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture)); - Directory.Move(currentPath, tempPath); + _directoryService.Move(currentPath, tempPath); currentPath = tempPath; } - Directory.Move(currentPath, newPath); - - // The injected service is a singleton, so its listings of both paths are now stale. - _directoryService.Invalidate(currentPath); - _directoryService.Invalidate(newPath); + _directoryService.Move(currentPath, newPath); } finally { |
