diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-12-03 11:45:14 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-12-03 11:45:14 -0500 |
| commit | 9aea46f82375d0314772fe5e58642b81bbdb6ccf (patch) | |
| tree | 8b78dfed43fa351559c19d87e19e22fdc329b762 /MediaBrowser.Api/Library | |
| parent | b9638b484ddc27de3c554ad622f1bdbdc97541de (diff) | |
add error handling
Diffstat (limited to 'MediaBrowser.Api/Library')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryHelpers.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Library/LibraryHelpers.cs b/MediaBrowser.Api/Library/LibraryHelpers.cs index 111922bcad..2e0afa4116 100644 --- a/MediaBrowser.Api/Library/LibraryHelpers.cs +++ b/MediaBrowser.Api/Library/LibraryHelpers.cs @@ -56,6 +56,11 @@ namespace MediaBrowser.Api.Library /// <param name="appPaths">The app paths.</param> public static void AddMediaPath(IFileSystem fileSystem, string virtualFolderName, string path, IServerApplicationPaths appPaths) { + if (!string.IsNullOrWhiteSpace(path)) + { + throw new ArgumentNullException("path"); + } + if (!fileSystem.DirectoryExists(path)) { throw new DirectoryNotFoundException("The path does not exist."); |
