Closed abdelaziz-mahdy closed 4 months ago
are you have file with name Anya?
It's a directory,
The same directory works if I used the other code
I tested a lot of directories none of them work with the 2 code but all of them work using the first code
Ok, thank you, i will investigate problem
hmm for me works fine
[2024-05-16 14:23:50.128214] localhost:21> PWD [2024-05-16 14:23:50.429664] localhost:21< 257 "/" is the current directory [2024-05-16 14:23:50.433038] localhost:21> NOOP [2024-05-16 14:23:50.733684] localhost:21< 200 NOOP ok. [2024-05-16 14:23:50.734494] localhost:21> CWD /test [2024-05-16 14:23:51.035693] localhost:21< 250 Directory successfully changed. [2024-05-16 14:23:51.036121] localhost:21> NOOP [2024-05-16 14:23:51.337646] localhost:21< 200 NOOP ok. [2024-05-16 14:23:51.337880] localhost:21> CWD /test [2024-05-16 14:23:51.638679] localhost:21< 250 Directory successfully changed. directory: FtpDirectory(path: /test) [2024-05-16 14:23:51.641598] localhost:21> PASV [2024-05-16 14:23:51.942716] localhost:21< 227 Entering Passive Mode (127,0,0,1,39,103). [2024-05-16 14:23:51.951404] localhost:21> LIST /test [2024-05-16 14:23:52.252670] localhost:21< 150 Here comes the directory listing. 226 Directory send OK. -rwxrwxrwx 1 1000 100 0 Jan 11 2023 test
i need some more information
I will try to test on the dev branch, maybe your changes fixed it ?
i tested on last 0.7.1 version
Will test and let you know. Thank you very much
still has the same problem
flutter: [2024-05-16 14:42:26.425663] 192.168.1.5:12378> NOOP
flutter: [2024-05-16 14:42:26.728003] 192.168.1.5:12378< 200 NOOP ok
flutter: [2024-05-16 14:42:26.730410] 192.168.1.5:12378> NOOP
flutter: [2024-05-16 14:42:27.033163] 192.168.1.5:12378< 200 NOOP ok
flutter: [2024-05-16 14:42:27.034392] 192.168.1.5:12378> CWD /Anya
flutter: [2024-05-16 14:42:27.337437] 192.168.1.5:12378< 250 CWD successful
flutter: [2024-05-16 14:42:27.338624] 192.168.1.5:12378> NOOP
flutter: [2024-05-16 14:42:27.641822] 192.168.1.5:12378< 200 NOOP ok
flutter: [2024-05-16 14:42:27.642464] 192.168.1.5:12378> CWD /Anya
flutter: [2024-05-16 14:42:27.945944] 192.168.1.5:12378< 250 CWD successful
flutter: directory: FtpDirectory(path: /Anya)
flutter: [2024-05-16 14:42:27.947516] 192.168.1.5:12378> PASV
flutter: [2024-05-16 14:42:28.250683] 192.168.1.5:12378< 227 Entering Passive Mode (192,168,1,5,143,149).
flutter: [2024-05-16 14:42:28.375558] 192.168.1.5:12378> LIST /Anya
flutter: [2024-05-16 14:42:28.678570] 192.168.1.5:12378< 450 Couldn't list that file
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FtpException: Error while listing directory
#0 FtpFileSystem.listDirectory.<anonymous closure> (package:pure_ftp/src/file_system/ftp_file_system.dart:138:9)
<asynchronous suspension>
#1 FtpSocket._openTransferChannelPassive (package:pure_ftp/src/ftp/ftp_socket.dart:240:16)
<asynchronous suspension>
#2 FtpFileSystem.listDirectory (package:pure_ftp/src/file_system/ftp_file_system.dart:126:20)
<asynchronous suspension>
#3 _FTPHomePageState._listDirectory (package:ftp_client/main.dart:74:24)
<asynchronous suspension>
using the first code gets me
flutter: [2024-05-16 14:42:04.555240] 192.168.1.5:12378> NOOP
flutter: [2024-05-16 14:42:04.857680] 192.168.1.5:12378< 200 NOOP ok
flutter: directory: FtpDirectory(path: /)
flutter: [2024-05-16 14:42:04.857983] 192.168.1.5:12378> PASV
flutter: [2024-05-16 14:42:05.160958] 192.168.1.5:12378< 227 Entering Passive Mode (192,168,1,5,173,209).
flutter: [2024-05-16 14:42:05.231071] 192.168.1.5:12378> LIST /Anya
flutter: [2024-05-16 14:42:05.534064] 192.168.1.5:12378< 150 Opening ASCII mode data connection for file list
226 Data transmission OK
flutter: -rw-r--r-- 1 owner group 9525945 May 21 19:22 Desktop.rar
drwxr-xr-x 1 owner group 3452 May 21 19:23 Desktop
which ftp server you are use?
i am using ftp server on mobile, https://play.google.com/store/apps/details?id=com.mi.android.globalFileexplorer&hl=en&gl=US
doesnt work
i am not blocked by that problem,
i manage the current directory in the app, and list the one i want using the code that works, so if its something related to my ftp i guess no need to fix it,
currentDirectory = dir ?? ftpConnect!.currentDirectory;
final dirEntries = await ftpConnect!.fs.listDirectory(directory: dir);
this is what i am doing to list the directory i want
@abdelaziz-mahdy try this branch https://github.com/crifurch/pure_ftp/tree/test_list_dir
Nice that one made the two codes work
I guess the fix was making list call without parameters?
Yes, little bit later i will add it to master brunch and release new version
this works
but this doesnt
the logs