From 3b55f8c137d7538e86c879c07b80ed6392cd862f Mon Sep 17 00:00:00 2001
From: Yorhel <git@yorhel.nl>
Date: Mon, 27 Mar 2017 17:12:18 +0200
Subject: [PATCH] dir_import.c: Restart fread() on EINTR

Fixes https://dev.yorhel.nl/ncdu/bug/95
---
 src/dir_import.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dir_import.c b/src/dir_import.c
index eaf625f..48a9e82 100644
--- a/src/dir_import.c
+++ b/src/dir_import.c
@@ -107,7 +107,7 @@ static int fill(int n) {
     if(r != n) {
       if(feof(ctx->stream))
         ctx->eof = 1;
-      else if(ferror(ctx->stream)) {
+      else if(ferror(ctx->stream) && errno != EINTR) {
         dir_seterr("Read error: %s", strerror(errno));
         return 1;
       }
-- 
GitLab