mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #5725] [MERGED] Fixed issue with determining if a directory was a directory or file #10622
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/5725
Author: @BrianCArnold
Created: 4/8/2021
Status: ✅ Merged
Merged: 4/8/2021
Merged by: @cvium
Base:
master← Head:Fix2845_PlaylistDeletion📝 Commits (3)
7c457daFixed issue with determining if a directory was a directory or file when it contained a '.' character in the directory path.2314487Update MediaBrowser.Controller/Playlists/Playlist.csa2acfb0Can't reference System.IO.Path as 'Path', even though System.IO is in the usings, because there is a Path property of the class.📊 Changes
1 file changed (+3 additions, -1 deletions)
View changed files
📝
MediaBrowser.Controller/Playlists/Playlist.cs(+3 -1)📄 Description
Fixed issue with determining if a directory was a directory or file when it contained a
.in the directory name.Changes
Checks to see if a path is an existing directory at all as a initial check to determine if a playlist path is a file path, then if it doesn't, attempts a check using System.IO.Path.HasExtension(string path).
//Let me know if that's too much comment there, it's not initially obvious why the change was made, and it seems like the sort of thing that could be easily reverted by accident if a contributor isn't aware of the reason for the change.
Issues
Resolves: #2845
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.