Skip to content

fix: avoid silent crash on missing timestamp file at first sync#101

Closed
stephdl wants to merge 1 commit into
mainfrom
sdl-fixTimeStampCrash
Closed

fix: avoid silent crash on missing timestamp file at first sync#101
stephdl wants to merge 1 commit into
mainfrom
sdl-fixTimeStampCrash

Conversation

@stephdl
Copy link
Copy Markdown
Collaborator

@stephdl stephdl commented May 21, 2026

When a sync task is created for the first time, the .timestamp file does
not exist yet. With set -e active, the cat call in get_file_age_in_days
could cause the script to exit silently before imapsync even starts,
despite the || : guard which is not reliable in ash subshell contexts.

Fixed by replacing || : with 2>/dev/null || true.

Fixes: first sync task always failing silently with "imapsync error: 143"

Modify file reading to handle errors without outputting messages.
@stephdl stephdl closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant