pimutils / pimutils/vdirsyncer
filesystem storage: expand ~ to $HOME in post_hook path
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 185
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 1
Description
[storage local]
type = "filesystem"
path = "~/Calendar/"
fileext = ".ics"
post_hook = "~/.config/vdirsyncer/post-hook"
warning: Error executing external hook: [Errno 2] No such file or directory: '~/.config/vdirsyncer/post-hook'
When reading the post_hook setting, please consider expanding ~ to the user's home dir path.
I suggest using python's os.path.expanduser(post_hook)
https://docs.python.org/3.7/library/os.path.html#os.path.expanduser
https://github.com/pimutils/vdirsyncer/blob/7a92aa20b1910eb5cc3c451a9a2fa62e76c80141/vdirsyncer/storage/filesystem.py#L29
https://github.com/pimutils/vdirsyncer/blob/c980097281ce729bff38d90f6c3c1a44a31262b1/rust/src/storage/filesystem.rs#L94
https://github.com/pimutils/vdirsyncer/blob/c980097281ce729bff38d90f6c3c1a44a31262b1/rust/src/storage/filesystem.rs#L49
Contributor guide
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
Start in vdirsyncer/storage/filesystem.py around the post_hook handling, then compare the corresponding logic in rust/src/storage/filesystem.rs at the referenced lines. Verify the configured ~/.config/vdirsyncer/post-hook resolves to the user's home directory and executes successfully for the filesystem storage configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100