althonos / althonos/fs.sshfs

Don't read past end of file

未关闭
#53 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
94
派生
32
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。