Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#6672 closed defect (fixed)

Shapefile REPACK cause corruptions on Windows

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone: 2.1.2
Component: OGR_SF Version: unspecified
Severity: normal Keywords: ogr shape repack
Cc:

Description

In QGIS related workflows (http://hub.qgis.org/issues/15393, http://hub.qgis.org/issues/15570), the current behaviour of REPACK that attempts to delete the existing .dbf, .shp, .shx and rename the _packed.dbf, ... as .dbf, .shp, .shx fails because there might be still file descriptors open on the .dbf, .shp, .shx in the current process or in other processes. The only reliable solution in this case is to modify in place the content of the files.

Change History (7)

comment:1 Changed 5 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 35619:

Shape: change REPACK implementation on Windows to be robust to remaining file descriptors openend on the .shp/.shx/.dbf (fixes #6672)

comment:2 Changed 5 months ago by Even Rouault

In 35620:

Improve test on Windows (refs #6672)

comment:3 Changed 5 months ago by Even Rouault

In 35621:

Shape repack: use correct memory allocation routine (refs #6672)

comment:4 Changed 5 months ago by Even Rouault

In 35622:

Shape: fix memory issue related to REPACK in-place (refs #6672). Fix pre-existing issue in DBFCloneEmpty() one a one field DBF not yet written to disk

comment:5 Changed 5 months ago by Even Rouault

In 35623:

Shape: change REPACK implementation on Windows to be robust to remaining file descriptors openend on the .shp/.shx/.dbf (fixes #6672)

comment:6 Changed 5 months ago by Even Rouault

In 35624:

Shape REPACK: make CSA happy (refs #6672)

comment:7 Changed 5 months ago by Even Rouault

In 35625:

Shape REPACK: make CSA happy (refs #6672)

Note: See TracTickets for help on using tickets.