Blob Blame History Raw
diff -up lftp-4.4.8/src/FileCopy.cc.overwrite lftp-4.4.8/src/FileCopy.cc
--- lftp-4.4.8/src/FileCopy.cc.overwrite	2013-11-28 10:42:18.374656024 +0100
+++ lftp-4.4.8/src/FileCopy.cc	2013-11-28 10:42:58.224631188 +0100
@@ -1414,7 +1414,7 @@ int FileCopyPeerFDStream::Do()
 	 {
 	    const char *new_name=dir_file(dirname(stream->full_name),suggested_filename);
 	    struct stat st;
-	    if(lstat(new_name,&st)==-1 && errno==ENOENT) {
+	    if((lstat(new_name,&st)==-1 && errno==ENOENT) || ResMgr::QueryBool("xfer:clobber",0)) {
 	       debug((5,"copy: renaming `%s' to `%s'\n",stream->full_name.get(),suggested_filename.get()));
 	       if(rename(stream->full_name,new_name)==-1)
 		  debug((3,"rename(%s, %s): %s\n",stream->full_name.get(),new_name,strerror(errno)));