Skip to content

Commit

Permalink
[XrdCl] Make sure local destination path is not scrambled, fixes #925
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal committed Mar 18, 2019
1 parent f7549d0 commit 2ffdb88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/XrdApps/XrdCpFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ XrdCpFile::XrdCpFile(const char *FSpec, int &badURL)
Protocol = isFile;
if (!strncmp(Path, "file://", 7))
{char *pP = Path + 7;
if (!strncmp(pP, "localhost", 9)) strcpy(Path, pP + 9);
else if (*pP == '/') strcpy(Path, pP);
if (!strncmp(pP, "localhost", 9)) memmove( Path, pP + 9, strlen( pP + 9 ) + 1 );
else if (*pP == '/') memmove( Path, pP, strlen( pP ) + 1 );
else {Protocol = isOther;
strcpy(ProtName, "remote");
return;
Expand Down

0 comments on commit 2ffdb88

Please sign in to comment.