File 0641-ftp-fixes-epath-error-when-nlisting-file.patch of Package erlang (Revision f91d552f4674a9ff24559814b49174a6)
Currently displaying revision f91d552f4674a9ff24559814b49174a6 , Show latest
52
1
From 50edb20b32ed64b8a17b97254ee243ea11c88343 Mon Sep 17 00:00:00 2001
2
From: Kiko Fernandez-Reyes <kiko@erlang.org>
3
Date: Mon, 23 Jan 2023 09:37:45 +0100
4
Subject: [PATCH 1/3] ftp: fixes epath error when nlisting file
5
6
---
7
lib/ftp/src/ftp.erl | 27 +++++++++++++++------------
8
1 file changed, 15 insertions(+), 12 deletions(-)
9
10
diff --git a/lib/ftp/src/ftp.erl b/lib/ftp/src/ftp.erl
11
index 4d81c1b11d..cff22946ab 100644
12
--- a/lib/ftp/src/ftp.erl
13
+++ b/lib/ftp/src/ftp.erl
14
15
%% %% overhead to be able to give a good return value. Alas not
16
%% %% all ftp implementations behave the same and returning
17
%% %% an error string is allowed by the FTP RFC.
18
- case lists:dropwhile(fun(?CR) -> false;(_) -> true end,
19
- binary_to_list(Data)) of
20
- L when (L =:= [?CR, ?LF]) orelse (L =:= []) ->
21
- _ = send_ctrl_message(State, mk_cmd("PWD", [])),
22
- activate_ctrl_connection(State),
23
- {noreply,
24
- State#state{caller = {handle_dir_data, Dir, Data}}};
25
- _ ->
26
- gen_server:reply(From, {ok, Data}),
27
- {noreply, State#state{client = undefined,
28
- caller = undefined}}
29
- end
30
+ %% case lists:dropwhile(fun(?CR) -> false;(_) -> true end,
31
+ %% binary_to_list(Data)) of
32
+ %% L when (L =:= [?CR, ?LF]) orelse (L =:= []) ->
33
+ %% _ = send_ctrl_message(State, mk_cmd("PWD", [])),
34
+ %% activate_ctrl_connection(State),
35
+ %% {noreply,
36
+ %% State#state{caller = {handle_dir_data, Dir, Data}}};
37
+ %% _ ->
38
+ %% gen_server:reply(From, {ok, Data}),
39
+ %% {noreply, State#state{client = undefined,
40
+ %% caller = undefined}}
41
+ %% end
42
%% </WTF>
43
+ gen_server:reply(From, {ok, Data}),
44
+ {noreply, State#state{client = undefined,
45
+ caller = undefined}}
46
end;
47
48
handle_ctrl_result({pos_compl, _}=Operation, #state{caller = {handle_dir_result, Dir},
49
--
50
2.35.3
51
52