#7019 closed defect (fixed)
DefaultCreateCopy()/gdal_translate deletes the target file in case of failure when -co APPEND_SUBDATASET=YES is used
Reported by: | Even Rouault | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 2.1.5 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
All in title. This is undesired behaviour. We should preserve the original file (which might be corrupted, but people have at least a better starting point to repare it...)
Change History (7)
comment:1 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 by , 7 years ago
Milestone: | → 2.1.5 |
---|
follow-up: 7 comment:5 by , 7 years ago
May I suggest to do some cleanup of the tables before exiting, so that the gpkg is left in a consistent state? Would it be possible to wrap it all in a transaction and just rollback in case of error?
comment:7 by , 7 years ago
Replying to elpaso:
May I suggest to do some cleanup of the tables before exiting, so that the gpkg is left in a consistent state?
Would be for a different ticket. Here this is a general fix for all drivers.
Would it be possible to wrap it all in a transaction and just rollback in case of error?
There are transactions used for some parts, but probably not for the whole process (would probably involved created a huge journal and copying it back to main file). I'm no longer sure.
In 39933: