aboutsummaryrefslogtreecommitdiffstats
path: root/src/calendarwriter.cpp
diff options
context:
space:
mode:
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.