pimutils / pimutils/vdirsyncer

filesystem storage: expand ~ to $HOME in post_hook path

Open
#797 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.