lbry-sdk
lbry-sdk copied to clipboard
Ensure that default download directory is writable on daemon startup
Creating a new issue based on lbryio/lbry-sdk#877
- Update ensure_directory_exists() to check that the directory is writable by the current process.
- If it's not, return a useful error
- Add tests to cover the case when
- download directory does not exist
- download dir exists but is not writable
- dir exists and is writable
- the path refers to a file not a directory
bonus: also check if disk is full when sdk starts. this check should be outside ensure_directory_exists()
. it probably goes somewhere near here
"Good first issue" is what I'm looking for! I'll write the code tomorrow.
PR for this https://github.com/lbryio/lbry-sdk/pull/3276 @snapperVibes sorry, didn't mean to try to snipe you, didn't see your comment until after I finished this!
Your code is cleaner anyways.
Hi @snapperVibes is this issue open ?
It's closed
@lyoshenka Is this issue open or closed?
This issue is open.
The pull request #3457, updating the ensure_directory_exists()
, is available for a review.
How impactful is the problem of the absence of the storage capacity fullness check on the start up? What would be a suitable methodology to verify the full storage capacity scenario? Would there be a merit in adding a check to see if the storage will potentially become full after a download? How impactful would the programming effort be?
The ensure_directory_exists()
now checks the directory is writable by the process.