From 42ea24338a8cbcd4e0d6786bfec8d7cfc194aa18 Mon Sep 17 00:00:00 2001 From: Wesley Kerfoot Date: Sat, 30 Nov 2019 13:52:44 -0500 Subject: [PATCH] Fix socket receive for stat command --- adb.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adb.nim b/adb.nim index 9314326..a8629b1 100644 --- a/adb.nim +++ b/adb.nim @@ -123,7 +123,7 @@ proc statFile(filename : string) : FileStat = socket.send("STAT" & filenameLen & filename) - let statResult : string = socket.recv(1024) + let statResult : string = socket.recvExactly(16) let command = map(statResult[0..3], proc (c : char) : string = $char(c)).join let fileMode = statResult[4..7].rollBytes.BiggestInt