Skip to content

Commit

Permalink
Even simpler fix for github issue gridcf#3
Browse files Browse the repository at this point in the history
This is an even simpler fix for gridcf/issues/3. It just disables the deletion
of the destination file when writing has failed.
  • Loading branch information
msalle committed May 26, 2020
1 parent 012788f commit 5205407
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -3358,7 +3358,9 @@ _c_xfer_file(ch_t * sch,
errcode_t ecl = EC_SUCCESS;
cmdret_t cr = CMD_SUCCESS;
size_t hashlen = 0;
#if 0
int delfile = 0;
#endif
int hashnl = 0;
int staged = 0;
int retry = s_retry();
Expand Down Expand Up @@ -3450,8 +3452,10 @@ _c_xfer_file(ch_t * sch,
goto cleanup;
}

#if 0
if (soff == (globus_off_t)-1)
delfile = 1;
#endif

ec = l_retrvfile(sch->lh, dch->lh, src, soff, slen);

Expand Down Expand Up @@ -3549,6 +3553,7 @@ _c_xfer_file(ch_t * sch,
ec_print(ecr);
ec_destroy(ecr);

#if 0
/* Remove the destination on error. */
if (cr != CMD_SUCCESS && delfile)
{
Expand All @@ -3572,6 +3577,7 @@ _c_xfer_file(ch_t * sch,
ec_destroy(ec);
ml_delete(dmlp);
}
#endif

if (cr == CMD_SUCCESS)
{
Expand Down

0 comments on commit 5205407

Please sign in to comment.