fix(ftp): ProbeFTP returns retrErr instead of err on RETR fallback failure #166
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/pget!166
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/fix-ftp-136-134"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
One-line fix: ProbeFTP returns
retrErr(the actual RETR error) instead oferr(the original SIZE error) when the RETR size-fallback fails.Why
When GetFTPFileSize fails and the RETR fallback also fails, the function was returning the wrong error. A user debugging would see a
SIZEerror whenRETRwas the actual failure.Also closes #134 (FTPS support) — already implemented via
ParseFTPURLreturninguseTLS boolandDialFTPusingftp.DialWithTLS.Testing
go test -race ./...— all passgolangci-lint run— 0 issuesBreaking Changes
None
Closes #136, #134
Review: APPROVED
Verification
go vet ./...— ✅ passesgo build ./...— ✅ passesgo test -race ./...— ✅ all passFix
internal/downloader/ftp.go:186—err→retrErrso the actual RETR failure is reported when SIZE + RETR fallback both fail (fixes #136)Closes #134, #136 on merge.