diff --git a/fiona/_vsiopener.pyx b/fiona/_vsiopener.pyx index 355139bc..c96f24a9 100644 --- a/fiona/_vsiopener.pyx +++ b/fiona/_vsiopener.pyx @@ -519,7 +519,7 @@ class FileContainer(ABC): pass @abstractmethod - def mtime(self, path: str) -> int: + def mtime(self, path: str) -> intmax_t: """Get the mtime of a resource.. Parameters @@ -618,7 +618,7 @@ class _FilesystemContainer(FileContainer): return [item if isinstance(item, str) else item["filename"] for item in self._obj.ls(path)] def mtime(self, path): try: - mtime = int(self._obj.modified(path).timestamp()) + mtime = long(self._obj.modified(path).timestamp()) except NotImplementedError: mtime = 0 return mtime diff --git a/fiona/gdal.pxi b/fiona/gdal.pxi index 9403bb2b..8b88cae6 100644 --- a/fiona/gdal.pxi +++ b/fiona/gdal.pxi @@ -62,7 +62,7 @@ cdef extern from "cpl_vsi.h" nogil: ctypedef struct VSIStatBufL: long st_size long st_mode - int st_mtime + long long st_mtime ctypedef enum VSIRangeStatus: VSI_RANGE_STATUS_UNKNOWN, VSI_RANGE_STATUS_DATA,