[GRASS-dev] Re: [GRASS GIS] #1158: Removing vector map in Windows fails with "Unable to delete vector map"

GRASS GIS trac at osgeo.org
Thu Apr 21 11:36:28 EDT 2011


#1158: Removing vector map in Windows fails with "Unable to delete vector map"
--------------------------------------------------------------------------+-
 Reporter:  lponti                                                        |       Owner:  grass-dev@…              
     Type:  defect                                                        |      Status:  new                      
 Priority:  blocker                                                       |   Milestone:  6.4.2                    
Component:  Vector                                                        |     Version:  6.4.0                    
 Keywords:  wingrass, g.mremove, wildcards, v.in.ogr, v.select, g.remove  |    Platform:  MSWindows 7              
      Cpu:  Unspecified                                                   |  
--------------------------------------------------------------------------+-

Comment(by mmetz):

 Replying to [comment:29 glynn]:
 > Replying to [comment:28 mmetz]:
 >
 > > None of the files making up a native GRASS vector should be still open
 when they are to be deleted.
 >
 > I know that they '''shouldn't''' be open, but are they? See comment:3.
 >
 OK. I suggest Vect!__open_old() and Vect_open_new() should initialize all
 file pointers to NULL and Vect_close() should close anything that is not
 NULL.

 These changes should IMHO first be done in trunk, then backported.

 > > I am pretty sure that they are all closed, otherwise g.remove should
 never work.
 >
 > But g.remove '''doesn't''' work.

 ... on the first run on Windows when using the wxGUI. BTW, it '''does'''
 work for me just fine on Windows using the !TclTk GUI.
 >
 > Well, it works on Unix, as it's perfectly valid to remove a file which
 is open (remove() and unlink() just remove the filename; the file itself
 will be removed once there are no more links and no process has it open).
 >
 > And it works on Windows if you use it to remove a half-deleted map. In
 this case, the history file never gets opened in the first place.
 >
 > But it doesn't work on Windows if you try to remove a valid map.
 >
 IOW, if Vect_close() is called before the files are to be removed.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/1158#comment:30>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list