diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-04-08 14:25:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-08 14:25:51 +0200 |
| commit | 9d0467addfb5c0704acf8af89736f189686f5c0c (patch) | |
| tree | 748414bca9f41ac4d4d86c00bd6a1d9b5c83ab85 | |
| parent | 47bbe4c1466da4959f8eeb01f75565e1e8791e18 (diff) | |
| parent | a2acfb02e994f9829c5a0131f583e720b3466ce8 (diff) | |
Merge pull request #5725 from BrianCArnold/Fix2845_PlaylistDeletion
| -rw-r--r-- | MediaBrowser.Controller/Playlists/Playlist.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Playlists/Playlist.cs b/MediaBrowser.Controller/Playlists/Playlist.cs index e8b7be7e2..977b14cb0 100644 --- a/MediaBrowser.Controller/Playlists/Playlist.cs +++ b/MediaBrowser.Controller/Playlists/Playlist.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Globalization; +using System.IO; using System.Linq; using System.Text.Json.Serialization; using System.Threading; @@ -43,7 +44,8 @@ namespace MediaBrowser.Controller.Playlists public static bool IsPlaylistFile(string path) { - return System.IO.Path.HasExtension(path); + // The path will sometimes be a directory and "Path.HasExtension" returns true if the name contains a '.' (dot). + return System.IO.Path.HasExtension(path) && !Directory.Exists(path); } [JsonIgnore] |
