mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +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
@@ -2998,6 +2998,20 @@ test_build_attribute_list_for_copy (void)
|
||||
g_assert_null (g_strstr_len (attrs_with_commas, -1, "," G_FILE_ATTRIBUTE_TIME_ACCESS ","));
|
||||
g_assert_null (g_strstr_len (attrs_with_commas, -1, "," G_FILE_ATTRIBUTE_TIME_ACCESS_USEC ","));
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_UTIMENSAT
|
||||
g_assert_nonnull (g_strstr_len (attrs_with_commas, -1, "," G_FILE_ATTRIBUTE_TIME_MODIFIED ","));
|
||||
g_assert_nonnull (g_strstr_len (attrs_with_commas, -1, "," G_FILE_ATTRIBUTE_TIME_MODIFIED_NSEC ","));
|
||||
if (flags & G_FILE_COPY_ALL_METADATA)
|
||||
{
|
||||
g_assert_nonnull (g_strstr_len (attrs_with_commas, -1, "," G_FILE_ATTRIBUTE_TIME_ACCESS ","));
|
||||
g_assert_nonnull (g_strstr_len (attrs_with_commas, -1, "," G_FILE_ATTRIBUTE_TIME_ACCESS_NSEC ","));
|
||||
}
|
||||
else
|
||||
{
|
||||
g_assert_null (g_strstr_len (attrs_with_commas, -1, "," G_FILE_ATTRIBUTE_TIME_ACCESS ","));
|
||||
g_assert_null (g_strstr_len (attrs_with_commas, -1, "," G_FILE_ATTRIBUTE_TIME_ACCESS_NSEC ","));
|
||||
}
|
||||
#endif
|
||||
g_free (attrs_with_commas);
|
||||
}
|
||||
|
Reference in New Issue
Block a user