Summary
Download progress shows 0% throughout when downloading files inside symlinked directories on SFTP. Data transfers correctly — only the progress display is broken.
Root cause
Two contributing factors:
sftp.stat(remote_path) may return size=0 for files accessed through symlinked directories (server returns no size attribute)
- For recursive downloads, total size is calculated from
f.size values from the READDIR listing — some servers omit size from READDIR attributes, leaving all sizes as 0
Steps to reproduce
- Connect to an SFTP server that uses symlinked directories (e.g. Bitvise with symlinks)
- Navigate into a symlinked directory
- Download a file or directory — transfer completes but progress shows 0% throughout
Expected
Progress bar reflects actual bytes transferred vs total file size.
Notes
Summary
Download progress shows 0% throughout when downloading files inside symlinked directories on SFTP. Data transfers correctly — only the progress display is broken.
Root cause
Two contributing factors:
sftp.stat(remote_path)may returnsize=0for files accessed through symlinked directories (server returns no size attribute)f.sizevalues from the READDIR listing — some servers omit size from READDIR attributes, leaving all sizes as 0Steps to reproduce
Expected
Progress bar reflects actual bytes transferred vs total file size.
Notes