close
The Wayback Machine - https://web.archive.org/web/20211217014902/https://github.com/lbryio/lbry-sdk/issues/3270
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that default download directory is writable on daemon startup #3270

Open
lyoshenka opened this issue Apr 20, 2021 · 10 comments
Open

Ensure that default download directory is writable on daemon startup #3270

lyoshenka opened this issue Apr 20, 2021 · 10 comments

Comments

@lyoshenka
Copy link
Member

@lyoshenka lyoshenka commented Apr 20, 2021

Creating a new issue based on #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

@snapperVibes
Copy link

@snapperVibes snapperVibes commented Apr 21, 2021

"Good first issue" is what I'm looking for! I'll write the code tomorrow.

Loading

@jeffreypicard
Copy link
Collaborator

@jeffreypicard jeffreypicard commented Apr 23, 2021

PR for this #3276
@snapperVibes sorry, didn't mean to try to snipe you, didn't see your comment until after I finished this!

Loading

@snapperVibes
Copy link

@snapperVibes snapperVibes commented Apr 23, 2021

Your code is cleaner anyways.

Loading

@Rishabhraghwendra18
Copy link

@Rishabhraghwendra18 Rishabhraghwendra18 commented Jul 7, 2021

Hi @snapperVibes is this issue open ?

Loading

@snapperVibes
Copy link

@snapperVibes snapperVibes commented Jul 7, 2021

It's closed

Loading

@RyanRussell00
Copy link

@RyanRussell00 RyanRussell00 commented Aug 4, 2021

@lyoshenka Is this issue open or closed?

Loading

@tzarebczan
Copy link
Member

@tzarebczan tzarebczan commented Aug 6, 2021

This issue is open.

Loading

@ghost
Copy link

@ghost ghost commented Oct 20, 2021

The pull request #3457, updating the ensure_directory_exists(), is available for a review.

Loading

@ghost
Copy link

@ghost ghost commented Oct 23, 2021

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?

Loading

@ghost
Copy link

@ghost ghost commented Oct 27, 2021

The ensure_directory_exists() now checks the directory is writable by the process.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

6 participants