n0-computer / n0-computer/sendme
`.sendme` folders not cleaned up after Ctrl+C
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
When cancelling a transfer, the temporary folders still stay around:
# on the sender side
$ sendme send something
^C
$ ls -a | grep .sendme
.sendme-send-(redacted)
# on the receiver side
$ sendme receive (redacted)
^C
$ ls -a | grep .sendme
.sendme-get-(redacted)
From my understanding, these folders process resumes, as deleting them will restart a transfer from scratch. However, they accumulate quickly. When testing out sendme, I had 4 of them in my Downloads folder already without knowing!
Here's a few ideas on how to solve this:
- Maybe move these folders somewhere central, so they don't get littered around your current working directory. Maybe one of the XDG directories, like
$XDG_CACHE_HOME/sendme. - Clean up resume data older than a certain period when sendme is next ran.
- Alternatively, have a
sendme cleancommand (or maybe both at once!). I don't like the idea of command-only as it's easy to forget to do. - The expiration period should probably be configurable somewhere, but I don't think sendme has any persistent config mechanisms yet.
- Alternatively, have a
- Delete the temporary folder when a transfer is cancelled voluntarily. I'd want to resume a transfer if my network drops out, but I wouldn't want to resume it most times I cancel it myself (e.g. I decide I don't want the file, or I'll be sending something else instead).
- I'm not sold on this idea, because this might not be desired behavior, because sometimes you want to resume a transfer when cancelling it (e.g. someone needs to go do something else for a short period). This could be solved with a command line argument, or maybe an interactive hotkey in the terminal (like how there's
cto copy to clipboard), but it would probably be easy to forget.
- I'm not sold on this idea, because this might not be desired behavior, because sometimes you want to resume a transfer when cancelling it (e.g. someone needs to go do something else for a short period). This could be solved with a command line argument, or maybe an interactive hotkey in the terminal (like how there's
This may also be related to #47? I noticed some weirdness cancelling a few times.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by tracing the send and receive command paths for cancellation and resume data, then review issue #47; a complete change would need an agreed cleanup policy, including how intentional cancellation differs from interrupted transfers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100