diff options
| author | Eric Reed <ebr@mediabrowser3.com> | 2013-03-04 11:59:57 -0500 |
|---|---|---|
| committer | Eric Reed <ebr@mediabrowser3.com> | 2013-03-04 11:59:57 -0500 |
| commit | e5a78ba5bf8f0e181c9d1991ba37cb9116d32c1d (patch) | |
| tree | f03acbc59d8799f9dc861b8b77ab4334082c4503 /MediaBrowser.Api/Library/LibraryHelpers.cs | |
| parent | 62448129a66f50b6ac2874c6da514399f974340e (diff) | |
| parent | da535db6554e1ca6610f247b02b3a0391e8f1f02 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryHelpers.cs')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryHelpers.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/MediaBrowser.Api/Library/LibraryHelpers.cs b/MediaBrowser.Api/Library/LibraryHelpers.cs index 2a3a04537..e956e214d 100644 --- a/MediaBrowser.Api/Library/LibraryHelpers.cs +++ b/MediaBrowser.Api/Library/LibraryHelpers.cs @@ -98,16 +98,15 @@ namespace MediaBrowser.Api.Library if (!Directory.Exists(path)) { - throw new DirectoryNotFoundException("The media folder does not exist"); + throw new DirectoryNotFoundException(string.Format("The media collection {0} does not exist", virtualFolderName)); } var shortcut = Directory.EnumerateFiles(path, "*.lnk", SearchOption.AllDirectories).FirstOrDefault(f => FileSystem.ResolveShortcut(f).Equals(mediaPath, StringComparison.OrdinalIgnoreCase)); - if (string.IsNullOrEmpty(shortcut)) + if (!string.IsNullOrEmpty(shortcut)) { - throw new DirectoryNotFoundException("The media folder does not exist"); + File.Delete(shortcut); } - File.Delete(shortcut); } /// <summary> |
