If an error occurs reading a file from the server, a 0
length file is left on the handheld.
This is caused because updating of files on the
handheld (and vice-versa) is done directly. Before
the transaction is attempted, the local file is opened
in write mode. If the transaction fails, this file is
closed, and therefore reset to 0 bytes.
The solution is to read all files into a temporary
local file first, and then only replace the real local
file on successful retrieval of the remote file.
This also applies to files updated on the remote
Log in to post a comment.