mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
glocalfileinfo: Add statx() support
This currently just implements the same functionality as the existing `stat()`/`fstat()`/`fstatat()`/`lstat()` calls, although where a reduced field set is requested it may return faster. Helps: #1970
This commit is contained in:
committed by
Philip Withnall
parent
622806d5cf
commit
60eefd4de9
@@ -99,12 +99,17 @@ test_validity (void)
|
||||
thumbnail_path = g_test_get_filename (G_TEST_DIST, "thumbnails",
|
||||
tests[i].filename, NULL);
|
||||
file_uri = g_strconcat ("file:///tmp/", tests[i].filename, NULL);
|
||||
#ifdef HAVE_STATX
|
||||
stat_buf.stx_mtime.tv_sec = tests[i].mtime;
|
||||
stat_buf.stx_size = tests[i].size;
|
||||
#else
|
||||
#ifdef G_OS_WIN32
|
||||
stat_buf.st_mtim.tv_sec = tests[i].mtime;
|
||||
#else
|
||||
stat_buf.st_mtime = tests[i].mtime;
|
||||
#endif
|
||||
stat_buf.st_size = tests[i].size;
|
||||
#endif
|
||||
|
||||
result = thumbnail_verify (thumbnail_path, file_uri, &stat_buf);
|
||||
|
||||
|
Reference in New Issue
Block a user