|
|
| Author |
Message |
< Advanced Erlang/OTP ~ Strange behaviour using ssh_sftp:list_dir |
| Vigis |
Posted: Wed Nov 12, 2008 10:44 am |
|
|
|
Joined: 10 Nov 2008
Posts: 2
Location: Sweden
|
Hi!
First post! Yay!
I have discovered a behavior that is, in my view, a bit strange. When i try to list a directory using ssh_sftp:list_dir/2 on a directory containing more than 100 files, it returns a list with exactly 100 files. The files seem to be a random selection (maybe sorted on creation date?).
Here is an example, trying to list a directory containing more than 44,000 files:
{ok, Files} = ssh_sftp:list_dir(Server, "/var/ardendo/tmp/soap"), {Files, length(Files)}.
{["ARDOME-SOAP-subtitleapi-getSubtitleList-2008-03-12-14:39:27.xml",
"ARDOME-SOAP-infoapi-getAppConfig-2008-03-12-14:39:27.xml",
"ARDOME-SOAP-usermgrapi-getUserSetting-2008-03-12-14:39:27.xml",
"ARDOME-SOAP-infoapi-getURLs-2008-03-12-14:39:27.xml",
"ARDOME-SOAP-infoapi-getConfVar-2008-03-12-14:39:27.xml",
"ARDOME-SOAP-rundownapi-getRundown-2008-03-12-14:39:27.xml",
"ARDOME-SOAP-publicapi-login-2008-03-12-14:39:26.xml",
[...]|...],
100}
Have anyone encountered this behavior/bug before (or found a working work-around)? Have i perhaps missed some step in the connection procedure? Is it somehow dependent on the implementation/version of ssh on the client machine?
Thanks in advance,
/Christoffer |
|
|
| Back to top |
|
| Vigis |
Posted: Tue Nov 18, 2008 9:39 am |
|
|
|
Joined: 10 Nov 2008
Posts: 2
Location: Sweden
|
I found a workaround/fix for this myself -> Upgrade to R12B5, which fixes this bug:
Quote: OTP-7318 [sftp] - When listing a directory with more than 100 files
only the first 100 where listed. This has now been fixed.
(I need to come out from my programming cocoon more often...) |
|
|
| Back to top |
|
| Mazen |
Posted: Tue Nov 18, 2008 12:02 pm |
|
|
|
User
Joined: 20 Jul 2006
Posts: 164
Location: London
|
Thanks for sharing I was looking for a solution for this after I had seen your post but couldn't find any.
/M |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|