Opened 7 years ago

Closed 7 years ago

Last modified 7 years 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 by Even Rouault, 7 years ago

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 by Even Rouault, 7 years ago

In 35620:

Improve test on Windows (refs #6672)

comment:3 by Even Rouault, 7 years ago

In 35621:

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

comment:4 by Even Rouault, 7 years ago

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 by Even Rouault, 7 years ago

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 by Even Rouault, 7 years ago

In 35624:

Shape REPACK: make CSA happy (refs #6672)

comment:7 by Even Rouault, 7 years ago

In 35625:

Shape REPACK: make CSA happy (refs #6672)

Note: See TracTickets for help on using tickets.