mirror of https://github.com/GNOME/gimp.git
app: port mtime code in gimp_data_save() to GIO
because it gets its stat() calls right.
This commit is contained in:
parent
0289eb8898
commit
e72cf05ccb
|
@ -530,11 +530,20 @@ gimp_data_save (GimpData *data,
|
|||
|
||||
if (success)
|
||||
{
|
||||
struct stat filestat;
|
||||
GFile *file = g_file_new_for_path (private->filename);
|
||||
GFileInfo *info = g_file_query_info (file, "time::*",
|
||||
G_FILE_QUERY_INFO_NONE,
|
||||
NULL, NULL);
|
||||
if (info)
|
||||
{
|
||||
private->mtime =
|
||||
g_file_info_get_attribute_uint64 (info,
|
||||
G_FILE_ATTRIBUTE_TIME_MODIFIED);
|
||||
g_object_unref (info);
|
||||
}
|
||||
|
||||
g_stat (private->filename, &filestat);
|
||||
g_object_unref (file);
|
||||
|
||||
private->mtime = filestat.st_mtime;
|
||||
private->dirty = FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue