urls_read: exit early if opening the file with URLs fails - sfeed_curses - sfeed curses UI (now part of sfeed, development is in sfeed)
 (HTM) git clone git://git.codemadness.org/sfeed_curses
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 768a524cd3bbfe7c225b08e539a6ba35f9464ecb
 (DIR) parent 827f4afdcecbb6cb53ee60d52d068ce5f94bbaac
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Wed, 14 Jul 2021 17:53:51 +0200
       
       urls_read: exit early if opening the file with URLs fails
       
       This now requires the URLs file (SFEED_URL_FILE) to exist, but it will not
       silently ignore the error if opening a file fails, for example with a
       permission issue.
       
       Diffstat:
         M sfeed_curses.c                      |       4 +++-
       
       1 file changed, 3 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/sfeed_curses.c b/sfeed_curses.c
       @@ -2035,8 +2035,10 @@ urls_read(void)
        
                urls_free();
        
       -        if (!urlfile || !(fp = fopen(urlfile, "rb")))
       +        if (!urlfile)
                        return;
       +        if (!(fp = fopen(urlfile, "rb")))
       +                die("fopen: %s", urlfile);
        
                while ((n = getline(&line, &linesiz, fp)) > 0) {
                        if (line[n - 1] == '\n')