File 0669-ftp-fix-forgotten-guard.patch of Package erlang
From 8d5d75ee71cb5e1b6ab737a6fd00d56d66a4a65d Mon Sep 17 00:00:00 2001
From: Kiko Fernandez-Reyes <kiko@erlang.org>
Date: Thu, 9 Feb 2023 14:32:52 +0100
Subject: [PATCH] ftp: fix forgotten guard
this commit fixes a mistake in GH-6793 where a guard was removed.
---
lib/ftp/src/ftp.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ftp/src/ftp.erl b/lib/ftp/src/ftp.erl
index 3408a0aca6..07bc5184e2 100644
--- a/lib/ftp/src/ftp.erl
+++ b/lib/ftp/src/ftp.erl
@@ -2338,7 +2338,7 @@ file_close(Fd) ->
file_read(Fd) ->
case file:read(Fd, ?FILE_BUFSIZE) of
- {ok, Bytes} ->
+ {ok, Bytes} when is_binary(Bytes) ->
{ok, byte_size(Bytes), Bytes};
eof ->
{ok, 0, []};
--
2.35.3