[PR #5725] [MERGED] Fixed issue with determining if a directory was a directory or file #10622

Closed
opened 2026-02-07 06:23:43 +03:00 by OVERLORD · 0 comments
Owner

📋 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: masterHead: Fix2845_PlaylistDeletion


📝 Commits (3)

  • 7c457da Fixed issue with determining if a directory was a directory or file when it contained a '.' character in the directory path.
  • 2314487 Update MediaBrowser.Controller/Playlists/Playlist.cs
  • a2acfb0 Can'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.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/5725 **Author:** [@BrianCArnold](https://github.com/BrianCArnold) **Created:** 4/8/2021 **Status:** ✅ Merged **Merged:** 4/8/2021 **Merged by:** [@cvium](https://github.com/cvium) **Base:** `master` ← **Head:** `Fix2845_PlaylistDeletion` --- ### 📝 Commits (3) - [`7c457da`](https://github.com/jellyfin/jellyfin/commit/7c457da9ab0803a467e8508203b527378066c099) Fixed issue with determining if a directory was a directory or file when it contained a '.' character in the directory path. - [`2314487`](https://github.com/jellyfin/jellyfin/commit/2314487e38d77f5d3a123ad2f0e76ab6ea2134c7) Update MediaBrowser.Controller/Playlists/Playlist.cs - [`a2acfb0`](https://github.com/jellyfin/jellyfin/commit/a2acfb02e994f9829c5a0131f583e720b3466ce8) Can'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) <details> <summary>View changed files</summary> 📝 `MediaBrowser.Controller/Playlists/Playlist.cs` (+3 -1) </details> ### 📄 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:23:43 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10622