diff options
author | Chris Toshok <toshok@ximian.com> | 2003-02-04 08:07:19 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2003-02-04 08:07:19 +0800 |
commit | 742bc235c0a29798db53c58a71e09bdb0a8764b1 (patch) | |
tree | b4562f51a5378eee0550b01a9a54dd3c36ba7961 /addressbook | |
parent | 8ddf5945c831e025224138bdcba64e1ce1e38893 (diff) | |
download | gsoc2013-evolution-742bc235c0a29798db53c58a71e09bdb0a8764b1.tar gsoc2013-evolution-742bc235c0a29798db53c58a71e09bdb0a8764b1.tar.gz gsoc2013-evolution-742bc235c0a29798db53c58a71e09bdb0a8764b1.tar.bz2 gsoc2013-evolution-742bc235c0a29798db53c58a71e09bdb0a8764b1.tar.lz gsoc2013-evolution-742bc235c0a29798db53c58a71e09bdb0a8764b1.tar.xz gsoc2013-evolution-742bc235c0a29798db53c58a71e09bdb0a8764b1.tar.zst gsoc2013-evolution-742bc235c0a29798db53c58a71e09bdb0a8764b1.zip |
pull forward Jack Jia's fix for #33672, but convert it to use unlink
2003-02-03 Chris Toshok <toshok@ximian.com>
* gui/component/addressbook-component.c (remove_folder): pull
forward Jack Jia's fix for #33672, but convert it to use unlink
instead of the gnome-vfs stuff.
svn path=/trunk/; revision=19721
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 6 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-component.c | 29 |
2 files changed, 22 insertions, 13 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 051295480b..05385eea62 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2003-02-03 Chris Toshok <toshok@ximian.com> + + * gui/component/addressbook-component.c (remove_folder): pull + forward Jack Jia's fix for #33672, but convert it to use unlink + instead of the gnome-vfs stuff. + 2003-01-27 Chris Toshok <toshok@ximian.com> * gui/contact-editor/contact-editor.glade: add a scrolled window diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index 1d9371fdc8..244afb0cc6 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -135,7 +135,7 @@ remove_folder (EvolutionShellComponent *shell_component, void *closure) { CORBA_Environment ev; - char *addressbook_db_path, *subdir_path; + char *db_path, *summary_path, *subdir_path; struct stat sb; int rv; @@ -175,24 +175,27 @@ remove_folder (EvolutionShellComponent *shell_component, return; } - addressbook_db_path = g_build_filename (physical_uri + 7, "addressbook.db", NULL); - rv = unlink (addressbook_db_path); - g_free (addressbook_db_path); - if (rv == 0) { + db_path = g_build_filename (physical_uri + 7, "addressbook.db", NULL); + summary_path = g_build_filename (physical_uri + 7, "addressbook.db.summary", NULL); + rv = unlink (db_path); + + if (rv == 0 || (rv == -1 && errno == ENOENT)) + rv = unlink (summary_path); + + if (rv == 0 || (rv == -1 && errno == ENOENT)) { GNOME_Evolution_ShellComponentListener_notifyResult (listener, GNOME_Evolution_ShellComponentListener_OK, &ev); } else { - if (errno == EACCES || errno == EPERM) - GNOME_Evolution_ShellComponentListener_notifyResult (listener, - GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED, - &ev); - else - GNOME_Evolution_ShellComponentListener_notifyResult (listener, - GNOME_Evolution_ShellComponentListener_INVALID_URI, /*XXX*/ - &ev); + GNOME_Evolution_ShellComponentListener_notifyResult (listener, + GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED, + &ev); } + + g_free (db_path); + g_free (summary_path); + CORBA_exception_free(&ev); } |