diff options
| author | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-09-08 10:05:09 -0400 |
|---|---|---|
| committer | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-09-08 10:05:09 -0400 |
| commit | 6f7095ce5b7d71928f57dd8f1f29988bcc07eb02 (patch) | |
| tree | 964f3b9a75f7ab181c9d580fc5ccafc61abf9843 /MediaBrowser.Controller/IO/FileData.cs | |
| parent | 0c05b03189db9598e00f52d7d12e3b7b3841f71f (diff) | |
Prevent recursive loop
Diffstat (limited to 'MediaBrowser.Controller/IO/FileData.cs')
| -rw-r--r-- | MediaBrowser.Controller/IO/FileData.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/IO/FileData.cs b/MediaBrowser.Controller/IO/FileData.cs index f5375e71b..789007be7 100644 --- a/MediaBrowser.Controller/IO/FileData.cs +++ b/MediaBrowser.Controller/IO/FileData.cs @@ -25,11 +25,14 @@ namespace MediaBrowser.Controller.IO 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);
-
- FindClose(handle);
+ if (!path.EndsWith("*"))
+ {
+ Logger.LogInfo("Handle came back invalid for {0}. Since this is a directory we'll try appending \\*.", path);
+
+ FindClose(handle);
- handle = FindFirstFile(Path.Combine(path, "*"), out data);
+ handle = FindFirstFile(Path.Combine(path, "*"), out data);
+ }
}
if (handle == IntPtr.Zero)
|
