althonos / althonos/fs.sshfs

Don't read past end of file

Ouverte
#53 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Python
Étoiles
94
Forks
32
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I'm dealing with an SFTP server that errors out if you send a `read()` for more bytes than the file has. Not sure if this is a common thing or my server is just not following specs (wouldn't surprise me).

I solved this by manually tracking the filesize and bytes read, but I'm wondering if there'd be any cons to just having this in the package?

Two options would be:

- Do what s3fs does and download into a temp file so that users won't encounter discrepancies between real filesystems and sftp
- Emulate reading beyond the last byte without actually sending requests

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.