diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-08-17 17:10:12 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-08-17 17:10:12 +0200 |
commit | 008bc99860fd353a5da5d06e6be5937f4a358aed (patch) | |
tree | d50b38f704b90b83895a21fd610bcf78c31b2cc9 /src/Photo.vala | |
parent | 4ec8ba6ace7234ddc24a7d362a34d9055a83812c (diff) | |
parent | 7eef6a59ba38582bed5d459974211eb1f53e1f5d (diff) |
Merge branch 'release/debian/0.32.2-1'debian/0.32.2-1
Diffstat (limited to 'src/Photo.vala')
-rw-r--r-- | src/Photo.vala | 18 |
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) { |