aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Plate <elupus@ecce.se>2014-11-16 13:44:58 +0100
committerJoakim Plate <elupus@ecce.se>2014-11-16 21:01:19 +0100
commitaeebd22d2e88fd14f1b0624d0bdbc6f791a75892 (patch)
treef1d007d03b38975604c2b7ebde72400222f94068
parentc685beae2b2c5c3e37c8b22e2a153a85c818e18d (diff)
smb: eliminate unused while loop in OpenDir
We loop this at outer level now
-rw-r--r--xbmc/filesystem/SMBDirectory.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/xbmc/filesystem/SMBDirectory.cpp b/xbmc/filesystem/SMBDirectory.cpp
index 026bd02b65..1fa00e6bff 100644
--- a/xbmc/filesystem/SMBDirectory.cpp
+++ b/xbmc/filesystem/SMBDirectory.cpp
@@ -253,7 +253,7 @@ int CSMBDirectory::OpenDir(const CURL& url, std::string& strAuth)
fd = smbc_opendir(s.c_str());
}
- while (fd < 0) /* only to avoid goto in following code */
+ if (fd < 0) /* only to avoid goto in following code */
{
std::string cError;
@@ -261,21 +261,15 @@ int CSMBDirectory::OpenDir(const CURL& url, std::string& strAuth)
{
if (m_flags & DIR_FLAG_ALLOW_PROMPT)
RequireAuthentication(urlIn);
- break;
}
-
- if (errno == ENODEV || errno == ENOENT)
+ else if (errno == ENODEV || errno == ENOENT)
cError = StringUtils::Format(g_localizeStrings.Get(770).c_str(),errno);
else
cError = strerror(errno);
if (m_flags & DIR_FLAG_ALLOW_PROMPT)
SetErrorDialog(257, cError.c_str());
- break;
- }
- if (fd < 0)
- {
// write error to logfile
CLog::Log(LOGERROR, "SMBDirectory->GetDirectory: Unable to open directory : '%s'\nunix_err:'%x' error : '%s'", CURL::GetRedacted(strAuth).c_str(), errno, strerror(errno));
}