If a changed source-file produces the same ccode we currently leave
existing files untouched. Although it is better to update the modification
timestamp of those to at least meet the one of associated source-file.
https://bugzilla.gnome.org/show_bug.cgi?id=683286
FileUtils.rename (temp_filename, filename);
} else {
FileUtils.unlink (temp_filename);
+ if (source_filename != null) {
+ var stats = Stat (source_filename);
+ var target_stats = Stat (filename);
+ if (stats.st_mtime >= target_stats.st_mtime) {
+ UTimBuf timebuf = { stats.st_atime + 1, stats.st_mtime + 1 };
+ FileUtils.utime (filename, timebuf);
+ }
+ }
}
}
}
[CCode (cname = "struct stat", cheader_filename = "sys/stat.h,glib/gstdio.h")]
public struct Stat {
+ public time_t st_atime;
+ public time_t st_mtime;
+ public time_t st_ctime;
[CCode (cname = "g_stat", instance_pos = -1)]
public Stat (string filename);
[Version (since = "2.6")]