summaryrefslogtreecommitdiff
path: root/src/Photo.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-08-12 10:07:55 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-08-12 10:07:55 +0200
commit2333d2b06d52754a55a747fa438844286f98d53a (patch)
treee46351c8ec622c9d13232cf00c8a1048e55184af /src/Photo.vala
parent7f667adb7b8d3a803a6cd6120dcea4ba4ff89075 (diff)
parentd0aaad443a88968dc61172c050084d3d9faa7602 (diff)
Update upstream source from tag 'upstream/0.32.2'
Update to upstream version '0.32.2' with Debian dir f0c4eb48b3e5ba2a80bbd45ac2effe5ecd515530
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) {