Opened 16 years ago

Closed 16 years ago

#2094 closed defect (fixed)

GDALDriver::CreateCopy() method always rewrites description of the target dataset

Reported by: dron Owned by: dron
Priority: normal Milestone: 1.5.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc:

Description

GDALDriver::CreateCopy() contains the following code

            if( poDstDS->GetDescription() == NULL 
                || strlen(poDstDS->GetDescription()) > 0 )
                poDstDS->SetDescription( pszFilename );

That means description of the target dataset will be rewritten even if it is already set. The code should be changed to:

            if( poDstDS->GetDescription() == NULL 
                || strlen(poDstDS->GetDescription()) == 0 )
                poDstDS->SetDescription( pszFilename );

Change History (1)

comment:1 by dron, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in revision r13353.

Note: See TracTickets for help on using tickets.