althonos / althonos/fs.sshfs

Don't read past end of file

Aperta
#53 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Python
Stelle
94
Fork
32
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.