From d443a3c2509889533ca812c163056bace396b586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 14 Jun 2023 20:35:58 +0200 Subject: New upstream version 0.32.1 --- src/LibraryFiles.vala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/LibraryFiles.vala') diff --git a/src/LibraryFiles.vala b/src/LibraryFiles.vala index bbacb6c..4941742 100644 --- a/src/LibraryFiles.vala +++ b/src/LibraryFiles.vala @@ -26,18 +26,18 @@ public void select_copy_function() { // Thus, when the method returns success a file may exist already, and should be overwritten. // // This function is thread safe. -public File? generate_unique_file(string basename, MediaMetadata? metadata, time_t ts, out bool collision) +public File? generate_unique_file(string basename, MediaMetadata? metadata, DateTime ts, out bool collision) throws Error { // use exposure timestamp over the supplied one (which probably comes from the file's // modified time, or is simply time()), unless it's zero, in which case use current time - time_t timestamp = ts; + DateTime timestamp = ts; if (metadata != null) { MetadataDateTime? date_time = metadata.get_creation_date_time(); if (date_time != null) timestamp = date_time.get_timestamp(); - else if (timestamp == 0) - timestamp = time_t(); + else if (timestamp == null) + timestamp = new DateTime.now_utc(); } // build a directory tree inside the library @@ -71,7 +71,7 @@ public string convert_basename(string basename) { // This function is thread-safe. private File duplicate(File src, FileProgressCallback? progress_callback, bool blacklist) throws Error { - time_t timestamp = 0; + DateTime? timestamp = null; try { timestamp = query_file_modified(src); } catch (Error err) { -- cgit v1.2.3