Skip to content

Commit

Permalink
changes requested
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Vasudeo Desai committed Jan 22, 2025
1 parent 64d2c87 commit 364a15b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/vector/Vlib/open_ogr.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,13 @@ int V2_open_old_ogr(struct Map_info *Map)

G_debug(3, "V2_open_old_ogr(): name = %s mapset = %s", Map->name,
Map->mapset);
char *map_name = NULL;

if (Vect_open_fidx(Map, &(Map->fInfo.ogr.offset)) != 0) {
map_name = Vect_get_full_name(Map);
G_warning(_("Unable to open feature index file for vector map <%s>"),
Vect_get_full_name(Map));
map_name);
G_free(map_name);
G_zero(&(Map->fInfo.ogr.offset), sizeof(struct Format_info_offset));
}

Expand Down Expand Up @@ -268,8 +271,10 @@ int Vect_open_fidx(struct Map_info *Map, struct Format_info_offset *offset)
dig_file_init(&fp);
fp.file = G_fopen_old(elem, GV_FIDX_ELEMENT, Map->mapset);
if (fp.file == NULL) {
char *map_name = Vect_get_full_name(Map);
G_debug(1, "unable to open fidx file for vector map <%s>",
Vect_get_full_name(Map));
map_name);
G_free(map_name);
return -1;
}

Expand Down

0 comments on commit 364a15b

Please sign in to comment.