mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Prevent recursive loop
This commit is contained in:
parent
0c05b03189
commit
6f7095ce5b
@ -25,11 +25,14 @@ namespace MediaBrowser.Controller.IO
|
|||||||
|
|
||||||
if (handle == INVALID_HANDLE_VALUE && !Path.HasExtension(path))
|
if (handle == INVALID_HANDLE_VALUE && !Path.HasExtension(path))
|
||||||
{
|
{
|
||||||
Logger.LogInfo("Handle came back invalid for {0}. Since this is a directory we'll try appending \\*.", path);
|
if (!path.EndsWith("*"))
|
||||||
|
{
|
||||||
FindClose(handle);
|
Logger.LogInfo("Handle came back invalid for {0}. Since this is a directory we'll try appending \\*.", path);
|
||||||
|
|
||||||
handle = FindFirstFile(Path.Combine(path, "*"), out data);
|
FindClose(handle);
|
||||||
|
|
||||||
|
handle = FindFirstFile(Path.Combine(path, "*"), out data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handle == IntPtr.Zero)
|
if (handle == IntPtr.Zero)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user