[gnome-games] file-operations: Stop using TimeVal
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] file-operations: Stop using TimeVal
- Date: Sun, 27 Oct 2019 08:42:58 +0000 (UTC)
commit 165c488234bf289bf898c4c77a04e2400fabe2da
Author: Veerasamy Sevagen <sevagenv gmail com>
Date: Sun Oct 27 08:42:36 2019 +0000
file-operations: Stop using TimeVal
TimeVal and FileInfo.get_modification_time() are deprecated. Switch to
get_modification_date_time() and DateTime instead.
Fixes #217
src/utils/file-operations.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/utils/file-operations.vala b/src/utils/file-operations.vala
index 41d92c84..7254c51f 100644
--- a/src/utils/file-operations.vala
+++ b/src/utils/file-operations.vala
@@ -70,10 +70,10 @@ public class Games.FileOperations {
var file_type = export_dir.query_file_type (FileQueryInfoFlags.NOFOLLOW_SYMLINKS);
var entry = new Archive.Entry ();
- var timeval = export_info.get_modification_time ();
+ var datetime = export_info.get_modification_date_time ();
entry.set_pathname (parent_working_dir.get_relative_path (export_dir));
entry.set_size ((Archive.int64_t) export_info.get_size ());
- entry.set_mtime ((time_t) timeval.tv_sec, 0);
+ entry.set_mtime ((time_t) datetime.to_unix (), 0);
entry.set_perm (export_info.get_attribute_uint32 (FileAttribute.UNIX_MODE));
if (file_type == FileType.DIRECTORY)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]