diff --git a/gio/gio-tool-copy.c b/gio/gio-tool-copy.c index 4a1dc4368..1b7ab48dc 100644 --- a/gio/gio-tool-copy.c +++ b/gio/gio-tool-copy.c @@ -40,6 +40,7 @@ static gboolean preserve = FALSE; static gboolean backup = FALSE; static gboolean no_dereference = FALSE; static gboolean default_permissions = FALSE; +static gboolean default_modified_time = FALSE; static const GOptionEntry entries[] = { { "no-target-directory", 'T', 0, G_OPTION_ARG_NONE, &no_target_directory, N_("No target directory"), NULL }, @@ -49,6 +50,7 @@ static const GOptionEntry entries[] = { { "backup", 'b', 0, G_OPTION_ARG_NONE, &backup, N_("Backup existing destination files"), NULL }, { "no-dereference", 'P', 0, G_OPTION_ARG_NONE, &no_dereference, N_("Never follow symbolic links"), NULL }, { "default-permissions", 0, 0, G_OPTION_ARG_NONE, &default_permissions, N_("Use default permissions for the destination"), NULL }, + { "default-modified-time", 0, 0, G_OPTION_ARG_NONE, &default_modified_time, N_("Use default file modification timestamps for the destination"), NULL }, G_OPTION_ENTRY_NULL }; @@ -181,6 +183,8 @@ handle_copy (int argc, char *argv[], gboolean do_help) flags |= G_FILE_COPY_ALL_METADATA; if (default_permissions) flags |= G_FILE_COPY_TARGET_DEFAULT_PERMS; + if (default_modified_time) + flags |= G_FILE_COPY_TARGET_DEFAULT_MODIFIED_TIME; error = NULL; start_time = g_get_monotonic_time ();