summaryrefslogtreecommitdiff
path: root/src/Photo.vala
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/Photo.vala
parentd443a3c2509889533ca812c163056bace396b586 (diff)
New upstream version 0.32.2upstream/0.32.2
Diffstat (limited to 'src/Photo.vala')
-rw-r--r--src/Photo.vala18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Photo.vala b/src/Photo.vala
index f31a17d..34cfedf 100644
--- a/src/Photo.vala
+++ b/src/Photo.vala
@@ -640,7 +640,7 @@ public abstract class Photo : PhotoSource, Dateable, Positionable {
File file = File.new_for_path(bpr.filepath);
FileInfo info = file.query_info(DirectoryMonitor.SUPPLIED_ATTRIBUTES,
FileQueryInfoFlags.NOFOLLOW_SYMLINKS, null);
- var timestamp = info.get_modification_date_time();
+ var timestamp = coarsify_date_time(info.get_modification_date_time());
PhotoFileInterrogator interrogator = new PhotoFileInterrogator(
file, PhotoFileSniffer.Options.GET_ALL);
@@ -1185,7 +1185,7 @@ public abstract class Photo : PhotoSource, Dateable, Positionable {
return ImportResult.UNSUPPORTED_FORMAT;
}
- var timestamp = info.get_modification_date_time();
+ var timestamp = coarsify_date_time(info.get_modification_date_time());
// if all MD5s supplied, don't sniff for them
if (params.exif_md5 != null && params.thumbnail_md5 != null && params.full_md5 != null)
@@ -1354,7 +1354,7 @@ public abstract class Photo : PhotoSource, Dateable, Positionable {
return null;
}
- var modification_time = info.get_modification_date_time();
+ var modification_time = coarsify_date_time(info.get_modification_date_time());
backing.filepath = file.get_path();
backing.timestamp = modification_time;
@@ -1709,7 +1709,7 @@ public abstract class Photo : PhotoSource, Dateable, Positionable {
// Use this only if the master file's modification time has been changed (i.e. touched)
public void set_master_timestamp(FileInfo info) {
- var modification = info.get_modification_date_time();
+ var modification = coarsify_date_time(info.get_modification_date_time());
try {
lock (row) {
@@ -1733,7 +1733,7 @@ public abstract class Photo : PhotoSource, Dateable, Positionable {
// Use this only if the editable file's modification time has been changed (i.e. touched)
public void update_editable_modification_time(FileInfo info) throws Error {
- var modification = info.get_modification_date_time();
+ var modification = coarsify_date_time(info.get_modification_date_time());
bool altered = false;
lock (row) {
@@ -2296,7 +2296,7 @@ public abstract class Photo : PhotoSource, Dateable, Positionable {
error("Unable to read file information for %s: %s", to_string(), err.message);
}
- var timestamp = info.get_modification_date_time();
+ var timestamp = coarsify_date_time(info.get_modification_date_time());
// interrogate file for photo information
PhotoFileInterrogator interrogator = new PhotoFileInterrogator(file);
@@ -2816,7 +2816,7 @@ public abstract class Photo : PhotoSource, Dateable, Positionable {
lock (row) {
return row.transformations != null
|| row.orientation != backing_photo_row.original_orientation
- || (date_time != null && !row.exposure_time.equal(date_time.get_timestamp()))
+ || (date_time != null && nullsafe_date_time_comperator(row.exposure_time, date_time.get_timestamp()) != 0)
|| (get_comment() != comment)
|| (get_title() != title);
}
@@ -4014,8 +4014,8 @@ public abstract class Photo : PhotoSource, Dateable, Positionable {
return;
}
- var timestamp = info.get_modification_date_time();
-
+ var timestamp = coarsify_date_time(info.get_modification_date_time());
+
BackingPhotoTable.get_instance().update_attributes(editable_id, timestamp,
info.get_size());
lock (row) {