diff --git a/FileUtils.cpp b/FileUtils.cpp index b3bcdffb..ffda3cf3 100644 --- a/FileUtils.cpp +++ b/FileUtils.cpp @@ -236,8 +236,8 @@ bool CFile::Chmod(const CString& sFile, mode_t mode) { return (chmod(sFile.c_str(), mode) == 0); } -bool CFile::Seek(unsigned long uPos) { - if (m_iFD != -1 && (unsigned int) lseek(m_iFD, uPos, SEEK_SET) == uPos) { +bool CFile::Seek(off_t uPos) { + if (m_iFD != -1 && lseek(m_iFD, uPos, SEEK_SET) == uPos) { ClearBuffer(); return true; } diff --git a/FileUtils.h b/FileUtils.h index 4200c96a..1c256408 100644 --- a/FileUtils.h +++ b/FileUtils.h @@ -96,7 +96,7 @@ public: static bool Copy(const CString& sOldFileName, const CString& sNewFileName, bool bOverwrite = false); bool Chmod(mode_t mode); static bool Chmod(const CString& sFile, mode_t mode); - bool Seek(unsigned long uPos); + bool Seek(off_t uPos); bool Truncate(); bool Sync(); bool Open(const CString& sFileName, int iFlags = O_RDONLY, mode_t iMode = 0644);