Skip to content

fix(sftp): download progress stuck at 0% for files in symlinked directories #52

Description

@Orinks

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:

  1. sftp.stat(remote_path) may return size=0 for files accessed through symlinked directories (server returns no size attribute)
  2. 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

  1. Connect to an SFTP server that uses symlinked directories (e.g. Bitvise with symlinks)
  2. Navigate into a symlinked directory
  3. Download a file or directory — transfer completes but progress shows 0% throughout

Expected

Progress bar reflects actual bytes transferred vs total file size.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions