sshnet / sshnet/SSH.NET

Sftp SynchronizeDirectories should not just use the size of the file to sync/update

Open
#33 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
4.4k
Forks
993
Avg merge
9d 21h
Merged PRs (30d)
1

Description

Currently the implementation of SynchronizeDirectories from SftpClient uses the size of the file to know if it needs to override it. Unfortunately this is not good enough in most cases. There is a comment about using MD5, which would be nice indeed. In the meantime, could we use a some file stamp comparison?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SftpClient's SynchronizeDirectories implementation and its existing comment about using MD5. Review how it currently compares file sizes, then determine how a file-stamp comparison should identify updates; done means files with unchanged size but different stamps are synchronized correctly and the relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.