mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Add functionality to preserve nanosecond timestamps
file copy doesn't preserve nanosecond timestamps Closes #369
This commit is contained in:
committed by
Philip Withnall
parent
7ad6b05458
commit
b33ef610de
@@ -168,7 +168,7 @@ g_local_file_class_init (GLocalFileClass *klass)
|
||||
0);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UTIMES
|
||||
#if defined(HAVE_UTIMES) || defined(HAVE_UTIMENSAT)
|
||||
g_file_attribute_info_list_add (list,
|
||||
G_FILE_ATTRIBUTE_TIME_MODIFIED,
|
||||
G_FILE_ATTRIBUTE_TYPE_UINT64,
|
||||
@@ -190,6 +190,18 @@ g_local_file_class_init (GLocalFileClass *klass)
|
||||
G_FILE_ATTRIBUTE_TIME_ACCESS_USEC,
|
||||
G_FILE_ATTRIBUTE_TYPE_UINT32,
|
||||
G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
|
||||
#endif /* HAVE_UTIMES || HAVE_UTIMENSAT */
|
||||
|
||||
#ifdef HAVE_UTIMENSAT
|
||||
g_file_attribute_info_list_add (list,
|
||||
G_FILE_ATTRIBUTE_TIME_MODIFIED_NSEC,
|
||||
G_FILE_ATTRIBUTE_TYPE_UINT32,
|
||||
G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE |
|
||||
G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
|
||||
g_file_attribute_info_list_add (list,
|
||||
G_FILE_ATTRIBUTE_TIME_ACCESS_NSEC,
|
||||
G_FILE_ATTRIBUTE_TYPE_UINT32,
|
||||
G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
|
||||
#endif
|
||||
|
||||
local_writable_attributes = list;
|
||||
|
Reference in New Issue
Block a user