Commit 1886512e authored by Jens Georg's avatar Jens Georg

Relax assertion in Photo file monitor

If the file is newly created, due to the way exiv2 does the metadata
writing (remove => rename due to windows limitations) and we do not ask
GLib for the MOVE event, we receive a DELETE event for the temp file
that exiv2 creats.
Signed-off-by: Jens Georg's avatarJens Georg <>
parent 956326ef
......@@ -4079,7 +4079,14 @@ public abstract class Photo : PhotoSource, Dateable {
private void on_editable_file_changed(File file, File? other_file, FileMonitorEvent event) {
// This has some expense, but this assertion is important for a lot of sanity reasons.
lock (readers) {
assert(readers.editable != null && file.equal(readers.editable.get_file()));
assert(readers.editable != null);
if (!file.equal(readers.editable.get_file())) {
// Ignore. When the export file is created, we receive a
// DELETE event for renaming temporary file created by exiv2 when
// writing meta-data.
debug("EDITABLE %s: %s", event.to_string(), file.get_path());
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment