Hi,
I've found a few minor issues with Integral FTP. I have fixes for two:
* FTPClient_onTransferProgress removes tags from ftpClient._tags via _getTag, so a null tag is passed on subsequent calls to onTransferProgress and onUploadFile/onDownloadFile.
* FTPClient_onDirectoryList passes file.name instead of file.path to fileList.add, so the file name and path have the same value.
You can download the patch from
http://www.alittletooquiet.net/media/integralftp/ftpclient-fixes.diff.
The last issue I'm seeing is in the JAR itself, so I can't track it down completely. It seems that after the first file transfer, calls to onTransferProgress continue to be passed the taskID and path from the first transfer. I have a simple example that demonstrates the problem:
http://www.alittletooquiet.net/media/integralftp/integral_ftp_test.zip
To run the test, extract the zip file, copy in the IntegralFTP.jar and ftpclient.js files, edit test.html to fill in the right server information, and open the file in a web browser.
The output I get is as follows:
Initializing...
Initialized.
Connecting.
Connected.
Uploading 1.dat.
Transfer progress: taskID = 2, path = /1.dat.
Uploaded 1.dat.
Uploading 2.dat.
Transfer progress: taskID = 2, path = 1.dat.
Uploaded 2.dat.
Uploading 3.dat.
Transfer progress: taskID = 2, path = 1.dat.
Uploaded 3.dat.
Uploading 4.dat.
Transfer progress: taskID = 2, path = 1.dat.
Uploaded 4.dat.
Uploading 5.dat.
Transfer progress: taskID = 2, path = 1.dat.
Uploaded 5.dat.
Uploading 6.dat.
Transfer progress: taskID = 2, path = 1.dat.
Uploaded 6.dat.
Uploading 7.dat.
Transfer progress: taskID = 2, path = 1.dat.
Uploaded 7.dat.
Uploading 8.dat.
Transfer progress: taskID = 2, path = 1.dat.
Uploaded 8.dat.
Uploading 9.dat.
Transfer progress: taskID = 2, path = 1.dat.
Uploaded 9.dat.
Uploading 10.dat.
Transfer progress: taskID = 2, path = 1.dat.
Uploaded 10.dat.
No more files.
Is there any way to fix this? Tracking transfer progress correctly with multiple uploads is impossible without a fix.
Thanks,
Forest