summaryrefslogtreecommitdiff
path: root/src/LibraryFiles.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-06-14 20:35:58 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-14 20:35:58 +0200
commitd443a3c2509889533ca812c163056bace396b586 (patch)
treee94ffc0d9c054ca4efb8fb327e18dfac88e15dc7 /src/LibraryFiles.vala
parentbb9797c14470641b082ebf635e2ae3cfd5f27a3b (diff)
New upstream version 0.32.1upstream/0.32.1
Diffstat (limited to 'src/LibraryFiles.vala')
-rw-r--r--src/LibraryFiles.vala10
1 files changed, 5 insertions, 5 deletions
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) {