diff options
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryStructureService.cs')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryStructureService.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs index 96af5240e..76abfb743 100644 --- a/MediaBrowser.Api/Library/LibraryStructureService.cs +++ b/MediaBrowser.Api/Library/LibraryStructureService.cs @@ -204,9 +204,17 @@ namespace MediaBrowser.Api.Library if (_fileSystem.DirectoryExists(virtualFolderPath)) { - throw new ArgumentException("There is already a media collection with the name " + name + "."); + throw new ArgumentException("There is already a media library with the name " + name + "."); } + if (!string.IsNullOrWhiteSpace(request.Path)) + { + if (!_fileSystem.DirectoryExists(request.Path)) + { + throw new DirectoryNotFoundException("The specified folder does not exist."); + } + } + _libraryMonitor.Stop(); try |
