Commit c27f2592 authored by David Dykstra's avatar David Dykstra

Check for EINVAL from a rename error call in addition to ENOENT because

David Campbell <david@pastornet.net.au> reported that that helps data
be received onto a windows box running cygwin b19.
parent af21c12f
......@@ -242,7 +242,8 @@ int make_backup(char *fname)
slprintf(fnamebak,sizeof(fnamebak),"%s%s",fname,backup_suffix);
if (do_rename(fname,fnamebak) != 0) {
if (errno != ENOENT) {
/* cygwin (at least version b19) reports EINVAL */
if (errno != ENOENT && errno != EINVAL) {
rprintf(FERROR,"rename %s %s : %s\n",fname,fnamebak,strerror(errno));
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment