From 669d5c0f35d31fcea3272952517f7a9c5c24a88d Mon Sep 17 00:00:00 2001 From: sgranjoux Date: Sat, 16 Feb 2008 14:07:15 +0000 Subject: [PATCH] * plugins/project-import/project-import.c: Fix #516743: Import project keeps an old date on project file * plugins/project-manager/plugin.c: Fix #516737: Import project doesn't load project with space in name git-svn-id: http://svn.gnome.org/svn/anjuta/trunk@3672 1dbfb86a-d425-0410-a06b-cb591aac69f6 --- ChangeLog | 8 ++++++++ plugins/project-import/project-import.c | 17 +++++++++++++++++ plugins/project-manager/plugin.c | 4 +++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 66e84cb5..dc1140f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2008-02-16 Sébastien Granjoux + * plugins/project-import/project-import.c: + Fix #516743: Import project keeps an old date on project file + + * plugins/project-manager/plugin.c: + Fix #516737: Import project doesn't load project with space in name + +2008-02-16 Sébastien Granjoux + * plugins/debug-manager/command.c: Destroy local variables on each step diff --git a/plugins/project-import/project-import.c b/plugins/project-import/project-import.c index c65b7b3b..bea8a271 100644 --- a/plugins/project-import/project-import.c +++ b/plugins/project-import/project-import.c @@ -338,6 +338,23 @@ project_import_generate_file(ProjectImport* pi, const gchar* prjfile) NULL); } } + + /* Update file time if possible */ + if (error == GNOME_VFS_OK) + { + GnomeVFSFileInfo *file_info; + + file_info = gnome_vfs_file_info_new (); + file_info->ctime = time (NULL); + file_info->mtime = file_info->ctime; + file_info->atime = file_info->ctime; + + gnome_vfs_set_file_info_uri (dest_uri, + file_info, + GNOME_VFS_SET_FILE_INFO_TIME); + + gnome_vfs_file_info_unref (file_info); + } gnome_vfs_uri_unref (source_uri); gnome_vfs_uri_unref (dest_uri); diff --git a/plugins/project-manager/plugin.c b/plugins/project-manager/plugin.c index 92082764..8df4babd 100644 --- a/plugins/project-manager/plugin.c +++ b/plugins/project-manager/plugin.c @@ -2254,7 +2254,9 @@ ifile_open (IAnjutaFile *ifile, const gchar* uri, GError **e) /* If there is already a project loaded, load in separate anjuta window */ if (plugin->project_root_uri) { - gchar *cmd = g_strconcat ("anjuta --no-splash --no-client ", uri, NULL); + gchar *quoted_uri = g_shell_quote (uri); + gchar *cmd = g_strconcat ("anjuta --no-splash --no-client ", quoted_uri, NULL); + g_free (quoted_uri); anjuta_util_execute_shell (NULL, cmd); g_free (cmd); return; -- 2.11.4.GIT