summaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-08-12 10:07:35 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-08-12 10:07:35 +0200
commitd0aaad443a88968dc61172c050084d3d9faa7602 (patch)
treeba9356dd1659416b3217c19bbebda413b8786021 /src/db
parentd443a3c2509889533ca812c163056bace396b586 (diff)
New upstream version 0.32.2upstream/0.32.2
Diffstat (limited to 'src/db')
-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.