Display free disk space below directory pickers (Add & Move torrent) #127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Shown in red if not enough free space is available:
I've hardcoded the
refetchInterval
to 5 seconds. Should I make it configurable?I had some doubts whether the implementation should try to be "smart" about the paths or just call the RPC method with whatever path we've got and don't care about it.
For example, an empty string passed as the path returns an error with transmission running on Windows. Not sure about other platforms.
Also, inexistent directories will also return an error, so we could potentially traverse the path upward until we get something, but this gets messy once we consider the possibility of the path containing symlinks.
So this would perhaps better be fixed in transmission itself, and not in a GUI client.