--- curlftpfs.old/ftpfs.c +++ curlftpfs/ftpfs.c @@ -769,6 +769,17 @@ if (!err) { + +// BUG FIX: The following three statements are an attempt to bypass +// various file-write problems. As of late 2008, the fix seems to +// work, for the most part, but there are some glitches. For example, +// "cp" commands may print error messages similar to "File not found" +// whether or not they're successful. + + ftpfs_unlink (path); + create_empty_file (path); + fi->flags &= ~(O_CREAT|O_TRUNC); + if ((fi->flags & O_CREAT) || (fi->flags & O_TRUNC)) { DEBUG(1, "opening %s for writing with O_CREAT or O_TRUNC. write thread will start now\n", path);