Skip to content
This repository
Browse code

udf: UDFFile root to behave correctly as folder to be readable by lib…

…dvdnav
  • Loading branch information...
commit 445e95a7cd0493ba7db8d2f2712a373bf3108263 1 parent deb47e9
Voyager1 authored January 03, 2014

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. 8  xbmc/filesystem/UDFFile.cpp
8  xbmc/filesystem/UDFFile.cpp
@@ -50,7 +50,7 @@ CUDFFile::~CUDFFile()
50 50
 //*********************************************************************************************
51 51
 bool CUDFFile::Open(const CURL& url)
52 52
 {
53  
-  if(!m_udfIsoReaderLocal.Open(url.GetHostName()))
  53
+  if(!m_udfIsoReaderLocal.Open(url.GetHostName()) || url.GetFileName().empty())
54 54
      return false;
55 55
 
56 56
   m_hFile = m_udfIsoReaderLocal.OpenFile(url.GetFileName());
@@ -125,6 +125,12 @@ int CUDFFile::Stat(const CURL& url, struct __stat64* buffer)
125 125
   if(!m_udfIsoReaderLocal.Open(url.GetHostName()))
126 126
      return -1;
127 127
 
  128
+  if (url.GetFileName().empty())
  129
+  {
  130
+    buffer->st_mode = _S_IFDIR;
  131
+    return 0;
  132
+  }
  133
+
128 134
   m_hFile = m_udfIsoReaderLocal.OpenFile(url.GetFileName());
129 135
   if (m_hFile != INVALID_HANDLE_VALUE)
130 136
   {

0 notes on commit 445e95a

Please sign in to comment.
Something went wrong with that request. Please try again.