Could be BUG! I am NOT sure...

Post bugreports for the Windows version here
arma
User
User
Posts: 61
Joined: Sun Jul 24, 2016 11:54 pm

Could be BUG! I am NOT sure...

Post by arma »

Hello everybody;

I have a sample ftp folder, When i use ftp software such as Filezilla there is no problem. Everything works fine. But when i need to directory list of my ftp folder on my purebasic. I cant get the directory list properly. By the was i use Ubuntu. I didnt try the same code on Windows nor Mac OSX. Maybe this is related to Ubuntu. Maybe all does the same. But i wonder if there is any way to get ftp list properly on purebasic (Ubuntu)
My sample code is below. Any solution for me?

Code: Select all

InitNetwork()
If OpenFTP(0,"ftp.armacomputer.com.tr","test","denemeX1453")
  If ExamineFTPDirectory(0)
    While NextFTPDirectoryEntry(0)
      Debug FTPDirectoryEntryName(0)
    Wend
    FinishFTPDirectory(0)
  EndIf
Else
  Debug "Can't connect to ftp"
EndIf
// Edit: Code-Tags added (Kiffi)
BarryG
Addict
Addict
Posts: 3324
Joined: Thu Apr 18, 2019 8:17 am

Re: Could be BUG! I am NOT sure...

Post by BarryG »

Screenshot showing PureBasic debug output result, and FileZilla list -> https://i.imgur.com/38LBpiD.png
infratec
Always Here
Always Here
Posts: 6874
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Could be BUG! I am NOT sure...

Post by infratec »

@Fred

As you can see here:
viewtopic.php?p=558900#p558900

Wireshrak report the structure correct.
Plain spaces between the strings.
User avatar
NicTheQuick
Addict
Addict
Posts: 1227
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Could be BUG! I am NOT sure...

Post by NicTheQuick »

@arma: Please change the title of your thread to a more meaningful one.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
Lord
Addict
Addict
Posts: 849
Joined: Tue May 26, 2009 2:11 pm

Re: Could be BUG! I am NOT sure...

Post by Lord »

???
Why screaming, just change the title of your thread to a more meaningful one.
Image
arma
User
User
Posts: 61
Joined: Sun Jul 24, 2016 11:54 pm

Re: Could be BUG! I am NOT sure...

Post by arma »

You mean this is not purebasic bug?
BarryG
Addict
Addict
Posts: 3324
Joined: Thu Apr 18, 2019 8:17 am

Re: Could be BUG! I am NOT sure...

Post by BarryG »

arma wrote:You mean this is not purebasic bug?
That's right: it's not. Use FTPDirectoryEntryRaw() to get the list (per below Help screenshot).

https://www.purebasic.com/documentation ... ryraw.html

Image
infratec
Always Here
Always Here
Posts: 6874
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Could be BUG! I am NOT sure...

Post by infratec »

@BarryG

If you look at the original thread, you will see that also FTDirectoryEntryRaw()
does not return all entries.

Code: Select all

InitNetwork()
If OpenFTP(0,"ftp.armacomputer.com.tr","test","denemeX1453")
  If ExamineFTPDirectory(0)
    While NextFTPDirectoryEntry(0)
      Debug FTPDirectoryEntryRaw(0)
    Wend
    FinishFTPDirectory(0)
  EndIf
Else
  Debug "Can't connect to ftp"
EndIf
It returns:

Code: Select all

08-25-20  11:59PM                11911 5
08-25-20  11:59PM                11911 2
08-25-20  11:59PM                11911 1
So it is still not possible to get all file entries.

It is not really a bug, since Fred wrote that it only works correct with Unix ftp,
but if something is only working partially, it is not good and should be fixed.

As I already mentioned many times...

all the high level network stuff should be changed to libcurl, because more possibilities and it
simply works on all platforms and it also allows the 's' versions of the protocols like imaps or ldaps
Post Reply