error ListDir (wodSFTP / wodSFTP.NET / wodSFTPdll)
I have a problem when i call the method LisDir if the remote directory have files i don´t have problems, but if it is no have files the component cycled.
and i can´t catch the error
The componet is woodFTPDLX
Re: error ListDir
Arturo,
what does it mean 'it cycled'? Can you please explain?
Kreso
Re: error ListDir
this is my code(simplified)
The problem is below.
Private Sub Ftp1_Done(ByVal ErrorCode As Integer, ByVal ErrorText As String) Handles Ftp1.Done
If ErrorCode = 0 Then
Select Case EstatusActual
Case Estatus.ObtenerLista '(Like State.GettingList in your examples)
If FoldersCollection.Count > 0 Then
' !!! Remote folder with no files ¡¡¡
Ftp1.RemotePath = FoldersCollection.Item(1)
' !!!!! Execute this line many times ¡¡¡¡¡
---- > Ftp1.ListDir()
End If
Case Estatus.Terminar '(Like States.DoneAll in your examples)
Ftp1.Disconnect()
End Select
Else
'MANEJO DEL ERROR
Indice = 0
EstatusActual = Estatus.Terminar
CajaError( El error es: & ErrorText)
End If
End Sub [color=#abcdef]Text[/color]
Re: error ListDir
Arturo,
no, this is the code, not the problem. Please can you explain what the problem is? I can't know what your code is doing.
But code is obviously wrong. If you're using nonblocking mode, then you *can not* send more than one ListDir without waiting for Done event in the meantime - so your loop cannot be there.
On the other hand, if you are using blocking mode, then you *are not* allowed to call methods from within wodFtpDLX'es event.
So, either way is wrong. Please change your code by above guidelines.
Kreso
Re: error ListDir
The problem is:
If the remote directory have files The code above works fine.
but, its don´t(The remote directory ); the line code ftp1.LisDir Execute many times
This is mi instance
Dim WithEvents Ftp1 As wodFtpDLXComLib.wodFtpDLXCom
Re: error ListDir
Hi Arturo,
Your part of code that you post it isn't enough to me to tell you where is the problem.
Could you send me over here your code to techsupport@weonlydo.com, so I can try to figure it out where is the problem.
Is this possible?
Hope I helped.
Regards,
Drazen