react-native-kookit 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -292,10 +292,17 @@ class FtpClient: @unchecked Sendable {
292
292
  }
293
293
  dataConnection.cancel()
294
294
 
295
- let finalResponse = try await readResponse()
296
- print("FTP DEBUG: Final response: \(finalResponse)")
297
- guard finalResponse.hasPrefix("226") else {
298
- throw FtpError.commandFailed("LIST completion failed: \(finalResponse)")
295
+ // Check if the response already contained the completion message (226)
296
+ if response.contains("226") {
297
+ print("FTP DEBUG: Transfer completion already received in LIST response - skipping final response read")
298
+ } else {
299
+ print("FTP DEBUG: Reading final response...")
300
+ let finalResponse = try await readResponse()
301
+ let finalFirstLine = finalResponse.components(separatedBy: .newlines).first ?? finalResponse
302
+ print("FTP DEBUG: Final response: \(finalFirstLine)")
303
+ guard finalFirstLine.hasPrefix("226") else {
304
+ throw FtpError.commandFailed("LIST completion failed: \(finalFirstLine)")
305
+ }
299
306
  }
300
307
 
301
308
  let files = parseListingData(data)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-kookit",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "React Native module for intercepting volume button presses on iOS and Android, with FTP client functionality",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",