diff --git a/src/common/io_file.cpp b/src/common/io_file.cpp index 067010a26..3db78a145 100644 --- a/src/common/io_file.cpp +++ b/src/common/io_file.cpp @@ -377,20 +377,6 @@ bool IOFile::Seek(s64 offset, SeekOrigin origin) const { return false; } - if (False(file_access_mode & (FileAccessMode::Write | FileAccessMode::Append))) { - u64 size = GetSize(); - if (origin == SeekOrigin::CurrentPosition && Tell() + offset > size) { - LOG_ERROR(Common_Filesystem, "Seeking past the end of the file"); - return false; - } else if (origin == SeekOrigin::SetOrigin && (u64)offset > size) { - LOG_ERROR(Common_Filesystem, "Seeking past the end of the file"); - return false; - } else if (origin == SeekOrigin::End && offset > 0) { - LOG_ERROR(Common_Filesystem, "Seeking past the end of the file"); - return false; - } - } - errno = 0; const auto seek_result = fseeko(file, offset, ToSeekOrigin(origin)) == 0; diff --git a/src/core/libraries/kernel/file_system.cpp b/src/core/libraries/kernel/file_system.cpp index 0150c11f5..ef3c2fe70 100644 --- a/src/core/libraries/kernel/file_system.cpp +++ b/src/core/libraries/kernel/file_system.cpp @@ -289,6 +289,7 @@ size_t PS4_SYSV_ABI _writev(int fd, const SceKernelIovec* iov, int iovcn) { } s64 PS4_SYSV_ABI sceKernelLseek(int d, s64 offset, int whence) { + LOG_TRACE(Kernel_Fs, "called: offset {} whence {}", offset, whence); auto* h = Common::Singleton::Instance(); auto* file = h->GetFile(d); if (file == nullptr) {