summaryrefslogtreecommitdiffstats
path: root/src/calendarwriter.cpp
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-24 17:50:47 +0200
committerDanilo M. <danix@danix.xyz>2026-09-24 17:50:47 +0200
commitff40d2a6dffdf234ade8bc4a5faa7624e58d5379 (patch)
treecf7b2469957db7d6d602cd4532263750eecdb9c4 /src/calendarwriter.cpp
parent7494ce76f1eefc2a9a2112d2f2ffec4709d90e08 (diff)
downloadqtmaildir-ff40d2a6dffdf234ade8bc4a5faa7624e58d5379.tar.gz
qtmaildir-ff40d2a6dffdf234ade8bc4a5faa7624e58d5379.zip
fix: drop orphaned overrides when a series stops, plus review minors
Diffstat (limited to 'src/calendarwriter.cpp')
-rw-r--r--src/calendarwriter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/calendarwriter.cpp b/src/calendarwriter.cpp
index 4c81a37..b39dced 100644
--- a/src/calendarwriter.cpp
+++ b/src/calendarwriter.cpp
@@ -49,6 +49,11 @@ Result replace(const QString &path, const std::optional<QByteArray> &expected,
return Result::Ok;
}
+ // ponytail: the stale read above and QSaveFile::commit() are not one
+ // atomic operation; a cron sync landing between them is lost. The writer
+ // holds no lock, because the sync command owns the flock. Upgrade path:
+ // take the same lock here if that window ever costs real data.
+ //
// QSaveFile is the platform's atomic write: a temporary in the same
// directory, renamed on commit(). Its temporary is named "<name>.XXXXXX",
// which does not end in .ics, so vdirsyncer never lists it.