From a08d2d7f1d2efd09e1c2a79c0748582592a7c6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 25 Aug 2012 02:29:56 +0200 Subject: [PATCH] Fix handling properties of large files (cherry picked from commit efcd2f6e634cec69d1620a654c4aecd7672f2ab2) --- CMakeLists.txt | 1 + src/kio_locate.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1eb547..20610b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,7 @@ include( ConfigureChecks.cmake ) add_definitions( -DHAVE_CONFIG_H + -D_LARGEFILE64_SOURCE ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) diff --git a/src/kio_locate.cpp b/src/kio_locate.cpp index b846b70..47a70eb 100644 --- a/src/kio_locate.cpp +++ b/src/kio_locate.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -188,7 +189,7 @@ static void addAtom(UDSEntry& entry, unsigned int uds, const TQString& s) } -static void addAtom(UDSEntry& entry, unsigned int uds, long l) +static void addAtom(UDSEntry& entry, unsigned int uds, long long l) { UDSAtom a; a.m_uds = uds; @@ -204,8 +205,8 @@ static const UDSEntry pathToUDSEntry(const TQString& path, const TQString& displ addAtom(entry, KIO::UDS_NAME, display); if (!path.isEmpty()) { - struct stat info; - lstat(path.local8Bit(), &info); + KDE_struct_stat info; + KDE_lstat(path.local8Bit(), &info); addAtom(entry, KIO::UDS_SIZE, info.st_size); addAtom(entry, KIO::UDS_ACCESS, info.st_mode);