Skip to content

Commit

Permalink
Replace FileInfo.get_modification_time () in preparation for 2038 (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Wootten authored Sep 30, 2021
1 parent 78e76e3 commit 073f5a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/VideoSupport.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ public class VideoSourceCollection : MediaSourceCollection {
if (video.get_filesize () != info.get_size ())
return;

if (video.get_timestamp () == info.get_modification_time ().tv_sec)
if (video.get_timestamp () == info.get_modification_date_time ().to_unix ());
matching_master.add (video);
}

Expand Down
4 changes: 2 additions & 2 deletions src/db/PhotoTable.vala
Original file line number Diff line number Diff line change
Expand Up @@ -984,14 +984,14 @@ public class BackingPhotoRow {
if (filesize != info.get_size ())
return false;

return timestamp == info.get_modification_time ().tv_sec;
return timestamp == info.get_modification_date_time ().to_unix ();
}

public bool is_touched (FileInfo info) {
if (filesize != info.get_size ())
return false;

return timestamp != info.get_modification_time ().tv_sec;
return timestamp != info.get_modification_date_time ().to_unix ();
}

// Copies another backing photo row into this one.
Expand Down
2 changes: 1 addition & 1 deletion src/util/file.vala
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public int64 query_file_modified (File file) throws Error {
FileInfo info = file.query_info (FileAttribute.TIME_MODIFIED, FileQueryInfoFlags.NOFOLLOW_SYMLINKS,
null);

return info.get_modification_time ().tv_sec;
return info.get_modification_date_time ().to_unix ();
}

public bool query_is_directory (File file) {
Expand Down

0 comments on commit 073f5a8

Please sign in to comment.