althonos / althonos/fs.sshfs

Don't read past end of file

Offen
#53 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Python
Sterne
94
Forks
32
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.