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

Vaclav Petras noreply at github.com
Tue Mar 30 18:09:45 PDT 2021


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass
  Commit: 27b12e21a0d71b96091625b5b07af1b253fe91aa
      https://github.com/OSGeo/grass/commit/27b12e21a0d71b96091625b5b07af1b253fe91aa
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2021-03-30 (Tue, 30 Mar 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