aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Kortstiege <mkortstiege@users.noreply.github.com>2015-10-01 08:04:07 +0200
committerMatthias Kortstiege <mkortstiege@users.noreply.github.com>2015-10-01 08:04:07 +0200
commitfabd2beb0400926d4a9813d9d78734467761a200 (patch)
treeb6e9634615903b6be5254d050413a1390d739393
parentb02f4c4df78a636ecdf7a464428bbb90a36e38d0 (diff)
parent5c7eb059c8de245fc05a9a4cb365648d6cb12d71 (diff)
Merge pull request #8164 from Paxxi/stat
[test][win32] Return ENOENT for empty path according to specs
-rw-r--r--xbmc/filesystem/win32/Win32File.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/xbmc/filesystem/win32/Win32File.cpp b/xbmc/filesystem/win32/Win32File.cpp
index 4cc4d930a0..9b34595c18 100644
--- a/xbmc/filesystem/win32/Win32File.cpp
+++ b/xbmc/filesystem/win32/Win32File.cpp
@@ -465,6 +465,12 @@ int CWin32File::Stat(const CURL& url, struct __stat64* statData)
return -1;
std::wstring pathnameW(CWIN32Util::ConvertPathToWin32Form(url));
+ if (pathnameW.empty())
+ {
+ errno = ENOENT;
+ return -1;
+ }
+
if (pathnameW.length() <= 6) // 6 is length of "\\?\x:"
return -1; // pathnameW is empty or points to device ("\\?\x:"), on win32 stat() for devices is not supported