copyurl: add option to print resulting auto-filename (#5095)

Fixes #5094
This commit is contained in:
albertony 2021-03-18 10:04:59 +01:00 committed by GitHub
parent 97fc3b9046
commit ce182adf46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 9 deletions

View file

@ -1635,6 +1635,7 @@ func copyURLFn(ctx context.Context, dstFileName string, url string, dstFileNameF
if dstFileName == "." || dstFileName == "/" {
return errors.Errorf("CopyURL failed: file name wasn't found in url")
}
fs.Debugf(dstFileName, "File name found in url")
}
return fn(ctx, dstFileName, resp.Body, resp.ContentLength, modTime)
}