On Wed, 10 Sep 2014 05:11:23 -0400 (EDT), Alexander V. Lukyanov wrote: > > Please try this patch.
Well, the patch seems to help. I think I am now getting legitimate output that I didn't always get before. But it did not completely solve the problem. After some further experimentation I was able to find a circumvention to the problem. And this circumvention technique implies the true source of the problem. But before I go any further, I need to supply some additional information that I didn't mention before, because I didn't think it was relevant, but it is now apparent that it is relevant. I am invoking the command like this: lftp -f getmyfile.lftp In other words, I am supplying a script file for lftp to execute. The contents of getmyfile.lftp look like this: debug -o getmyfile.output 9 set xfer:clobber yes open -u xxxxxxxx,yyyyyyyy -p nnnnn my.stupid.little.server.com get -a -e myfile -o myfile close (The other changes to the default values of "set" variables are being made in /etc/lftp.conf.) The significant point is that debug output is being directed to a file by means of the "-o" option of the debug command, instead of being written to the terminal. Now here is the circumvention technique that I use to get around the problem. If I manually erase (rm) the debug output file, getmyfile.output, left over from the previous run of the command, before invoking the command again, I get the expected output in getmyfile.output. But if I don't erase the getmyfile.output file before running the command, and this second run of the command produces less debug output than the first run did, then there will be left-over output from the previous run of the command at the end of the file. In other words, the first patch that you sent me, the one which eliminated the duplicate "PROT P" command, did not *cause* the second problem, rather, it *exposed* the second problem, which was there all along, and is logically unrelated to the original problem. I confirmed this in the following way. I erased the getmyfile.output file, then ran the lftp command listed above. I then examined getmyfile.output. Output was as expected. I then manually added four lines to the end of this file with a text editor, each of which said, "This is garbage.". I saved the changes and exited the editor. Then I ran the above lftp command again, without erasing the getmyfile.output file before running the lftp command. I then examined getmyfile.output. Surely enough, those four lines at the end, which said, "This is garbage.", were still there. So the problem is that when debug output is directed to a file by means of the "-o" option, any pre-existing file by that same name needs to be erased first. This is not being done. In hindsight, I should have opened a second thread for this; but I didn't realize that the two problems were unrelated at the time. Sorry about that. -- .''`. Stephen Powell : :' : `. `'` `- _______________________________________________ lftp mailing list lftp@uniyar.ac.ru http://univ.uniyar.ac.ru/mailman/listinfo/lftp