network.download - lots of console errors

Using v611, I download files to the Documents directory using network.download (from a local wb server). On the device (iPhone 4, iOS 4.3.5) I get a lot of errors like:

Sep 13 17:48:13 unknown sandboxd[665] : iPhoneTest.m(663) deny file-write-create /ase-nav.css

The actual file does not exist according to io.open it is a nil value. Any thoughts?

The call I make is:

network.download(source_file,“GET”,networkListener,destination,system.DocumentsDirectory)

with destination “ase-nav.css”

Any clues greatly appreciated - I must be missing something obvious. The simulator runs fine :frowning:

–M [import]uid: 5822 topic_id: 15062 reply_id: 315062[/import]

v617 has the same problem. I am trying to download a lot of files.

The annoying thing is that using LuaSockets

local tmp = io.open(destination,“wb”)
http.request{url = source_file,sink = ltn12.sink.file(tmp)}

Stops on the device, not the simulator. Memory leak, or too many files open, or…?

Any thoughts highly appreciated. Essentially - think of what to do to make a small web crawler in Corona? [import]uid: 5822 topic_id: 15062 reply_id: 55745[/import]

hey,

I am downloading a lot of files too, i am using network.download() for that and it works fine.
I wrote a recursive function that processes a map with all the filenames to download. It calls itself again from the callback of the network.request once one download is complete. (so I wont start 10000000 downloads synchronously)

cheers! [import]uid: 11772 topic_id: 15062 reply_id: 60840[/import]