| 
														
															@@ -22,6 +22,7 @@ namespace MediaBrowser.Controller.IO 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         {
 
														 | 
														
														 | 
														
															         {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             WIN32_FIND_DATA data;
 
														 | 
														
														 | 
														
															             WIN32_FIND_DATA data;
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             IntPtr handle = FindFirstFile(path, out data);
 
														 | 
														
														 | 
														
															             IntPtr handle = FindFirstFile(path, out data);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            bool getFilename = false;
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (handle == INVALID_HANDLE_VALUE && !Path.HasExtension(path))
 
														 | 
														
														 | 
														
															             if (handle == INVALID_HANDLE_VALUE && !Path.HasExtension(path))
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             {
 
														 | 
														
														 | 
														
															             {
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -32,6 +33,8 @@ namespace MediaBrowser.Controller.IO 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     FindClose(handle);
 
														 | 
														
														 | 
														
															                     FindClose(handle);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     handle = FindFirstFile(Path.Combine(path, "*"), out data);
 
														 | 
														
														 | 
														
															                     handle = FindFirstFile(Path.Combine(path, "*"), out data);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    getFilename = true;
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 }
 
														 | 
														
														 | 
														
															                 }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             }
 
														 | 
														
														 | 
														
															             }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -39,6 +42,11 @@ namespace MediaBrowser.Controller.IO 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             {
 
														 | 
														
														 | 
														
															             {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 throw new IOException("FindFirstFile failed");
 
														 | 
														
														 | 
														
															                 throw new IOException("FindFirstFile failed");
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             }
 
														 | 
														
														 | 
														
															             }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (getFilename)
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                data.cFileName = Path.GetFileName(path);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             
 
														 | 
														
														 | 
														
															             
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             FindClose(handle);
 
														 | 
														
														 | 
														
															             FindClose(handle);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 |