althonos / althonos/fs.sshfs

Don't read past end of file

Đang mở
#53 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
94
Fork
32
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.