pycom / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
197 stars 167 forks source link

Development branch 1.19.0.b2: ftp shows duplicate file name #174

Closed robert-hh closed 6 years ago

robert-hh commented 6 years ago

Firmware 1.19.0.b2, device WiPy3 When requesting a file list with ftp, some files names are listed twice. That does not happen with uos.listdir() on the device. Ftp clients tested are command line ftp in Linux, FileZilla and FireFTP When creating, renaming and deleting files on the device, the name that is shown twice changes. Maybe deleted files are not properly handled (=skipped) by the ftp server.

husigeza commented 6 years ago

Hello,

Could you share a detailed example of steps you did? Unfortunately I could not reproduce it on my own, no files are listed twice with FileZilla (v3.28.0)/ftp Linux command, even the delete/rename/add operation issued on the device itself or through FTP.

Do you notice this behavior on an attached SD card too?

Please also share the FTP settings you used for connecting.

Thanks!

robert-hh commented 6 years ago

The ftp settings are standard, the same as I use for all Pycom board: passive, 1 session per link. Note, that this also happens with command line ftp. It does not happen with v1.18.0 and, and I do not use an SD card. It's on internal flash. What I did not do yet is wiping out the device, re-flash and create a new file system. The store/delete/rename cycle happens with my onboard editor (https://github.com/robert-hh/Micropython-Editor), which, when saving

robert-hh commented 6 years ago

OK. I re-tested that, I took the WiPy3,

After a upload a few file, like after the 6th file, two of the existing file names were shown twice. Listing files at the REPL prompt with uos.listdir() does not show this effect. After deleting files the duplication went away. Edit: the same with a FiPy and using command line ftp.

husigeza commented 6 years ago

Hello,

Based on your detailed steps I could reproduce the issue, thanks! For me the problem only exists when the files are copied onto /flash directly. If they are placed in a folder (e.g.: /flash/folder) they are not listed twice, so until I fix this issue I would recommend putting your files into a folder :)

husigeza commented 6 years ago

I did further testing... The problem appears, no matter of the location, when more than 8 objects (dirs+files) are located in a folder. If you copy/create the 9th file/folder then 2 items will be listed twice.

husigeza commented 6 years ago

Hello,

The root cause was found and corrected, will be part of the next Development release. Thanks for reporting the problem!

robert-hh commented 6 years ago

Thanks. It seems anyhow to be a display only issue.