[GRASS-git] [OSGeo/grass] abb121: parser: Show error for option file (#1433)

Vaclav Petras noreply at github.com
Mon Nov 22 12:20:24 PST 2021

  Branch: refs/heads/releasebranch_7_8
  Home:   https://github.com/OSGeo/grass
  Commit: abb1214a83e19684eb98f4794de8a5cb7fb74421
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2021-11-22 (Mon, 22 Nov 2021)

  Changed paths:
    M lib/gis/parser.c

  Log Message:
  parser: Show error for option file (#1433)

Show the actual error using errno in G_open_option_file function.
Influences g.list, v.external.out, v.in.ascii.

Users won't have to wonder why the file cannot be created or opened.

strerror(errno) is used in lib/gis. Only POSIX fopen requires errno to be set,
but even on Windows errno should be used to obtain specific error information
on error when using fopen according to docs.

More information about the grass-commit mailing list