From da7401ebec9151b19798a445d014aece2951046c Mon Sep 17 00:00:00 2001 From: eoudejans Date: Tue, 29 Apr 2025 11:03:49 +0200 Subject: [PATCH] Fix issue #899. Tif files openened/created for writing were opened using append mode "a", which caused consequtive writes to grow the tiffile by the given domain of the dataitem. This was never a problem as geodms handled temporary (.tmp) files itself and deleted these accordingly. Changing "a" to "w" makes sure that a new tif file is always created on write, which is in line with the new state: new writes always to fresh files. --- stg/dll/src/tif/TifImp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stg/dll/src/tif/TifImp.cpp b/stg/dll/src/tif/TifImp.cpp index 98279be23..94c23debc 100644 --- a/stg/dll/src/tif/TifImp.cpp +++ b/stg/dll/src/tif/TifImp.cpp @@ -423,7 +423,7 @@ bool TifImp::OpenForWriteDirect(WeakStr name) { GetWritePermission(name); - m_TiffHandle = TIFFOpen(ConvertDmsFileName(name).c_str(), "a"); + m_TiffHandle = TIFFOpen(ConvertDmsFileName(name).c_str(), "w"); if (m_TiffHandle) TIFFSetField(m_TiffHandle, TIFFTAG_SOFTWARE, "GeoDMS " BOOST_STRINGIZE( DMS_VERSION_MAJOR ) ); return m_TiffHandle;