diff options
author | Karlson2k <k2k@narod.ru> | 2014-11-06 22:07:44 +0300 |
---|---|---|
committer | Karlson2k <k2k@narod.ru> | 2014-11-07 11:39:32 +0300 |
commit | 3b0dc204350513337594abbd5b22a35bd3f58402 (patch) | |
tree | 9d1d89f484ae9331672fd3bd2f9fedb7ba8ad1bd | |
parent | b202cd09426d1ce1e8921b827a84476472cf35fe (diff) |
[vfs] [posix] SMBFile::GetPosition() return correct values on errors
-rw-r--r-- | xbmc/filesystem/SMBFile.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/xbmc/filesystem/SMBFile.cpp b/xbmc/filesystem/SMBFile.cpp index 12f3a60562..4949ab0048 100644 --- a/xbmc/filesystem/SMBFile.cpp +++ b/xbmc/filesystem/SMBFile.cpp @@ -310,13 +310,11 @@ CSMBFile::~CSMBFile() int64_t CSMBFile::GetPosition() { - if (m_fd == -1) return 0; + if (m_fd == -1) + return -1; smb.Init(); CSingleLock lock(smb); - int64_t pos = smbc_lseek(m_fd, 0, SEEK_CUR); - if ( pos < 0 ) - return 0; - return pos; + return smbc_lseek(m_fd, 0, SEEK_CUR); } int64_t CSMBFile::GetLength() |