Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple clean fix for github issue gridcf#3 #5

Merged
merged 1 commit into from
Jun 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -3358,7 +3358,6 @@ _c_xfer_file(ch_t * sch,
errcode_t ecl = EC_SUCCESS;
cmdret_t cr = CMD_SUCCESS;
size_t hashlen = 0;
int delfile = 0;
int hashnl = 0;
int staged = 0;
int retry = s_retry();
Expand Down Expand Up @@ -3450,9 +3449,6 @@ _c_xfer_file(ch_t * sch,
goto cleanup;
}

if (soff == (globus_off_t)-1)
delfile = 1;

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

if (ec != EC_SUCCESS)
Expand Down Expand Up @@ -3549,30 +3545,6 @@ _c_xfer_file(ch_t * sch,
ec_print(ecr);
ec_destroy(ecr);

/* Remove the destination on error. */
if (cr != CMD_SUCCESS && delfile)
{
/* Stat the file. */
ec = l_stat(dch->lh, dst, &dmlp);

/* If we successfully stat'ed the file... */
if (!ec && dmlp)
{
/* If it is not a character or block device... */
if (!(S_ISCHR(dmlp->type) || S_ISBLK(dmlp->type)))
ec = l_rm(dch->lh, dst);
}

if (ec)
o_fprintf(stderr,
DEBUG_ERRS_ONLY,
"Failed to remove the destination file.\n");

ec_print(ec);
ec_destroy(ec);
ml_delete(dmlp);
}

if (cr == CMD_SUCCESS)
{
buf = Sprintf(NULL, "%"GLOBUS_OFF_T_FORMAT" bytes", slen);
Expand Down