summaryrefslogtreecommitdiff
path: root/src/db/PhotoTable.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-08-17 17:10:12 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-08-17 17:10:12 +0200
commit008bc99860fd353a5da5d06e6be5937f4a358aed (patch)
treed50b38f704b90b83895a21fd610bcf78c31b2cc9 /src/db/PhotoTable.vala
parent4ec8ba6ace7234ddc24a7d362a34d9055a83812c (diff)
parent7eef6a59ba38582bed5d459974211eb1f53e1f5d (diff)
Merge branch 'release/debian/0.32.2-1'debian/0.32.2-1
Diffstat (limited to 'src/db/PhotoTable.vala')
-rw-r--r--src/db/PhotoTable.vala14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/db/PhotoTable.vala b/src/db/PhotoTable.vala
index 4e3f672..420b209 100644
--- a/src/db/PhotoTable.vala
+++ b/src/db/PhotoTable.vala
@@ -1170,8 +1170,11 @@ public class BackingPhotoRow {
if (timestamp == null)
return false;
-
- return timestamp.equal(info.get_modification_date_time());
+
+ // Need to remove the microseconds from the FileInfo, since the database
+ // just stores second granularity, causing the file to be marked as modified all
+ // the time
+ return timestamp.equal(coarsify_date_time(info.get_modification_date_time()));
}
public bool is_touched(FileInfo info) {
@@ -1180,8 +1183,11 @@ public class BackingPhotoRow {
if (timestamp == null)
return true;
-
- return !timestamp.equal(info.get_modification_date_time());
+
+ // Need to remove the microseconds from the FileInfo, since the database
+ // just stores second granularity, causing the file to be marked as modified all
+ // the time
+ return !timestamp.equal(coarsify_date_time(info.get_modification_date_time()));
}
// Copies another backing photo row into this one.