aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-02-04 08:07:19 +0800
committerChris Toshok <toshok@src.gnome.org>2003-02-04 08:07:19 +0800
commit742bc235c0a29798db53c58a71e09bdb0a8764b1 (patch)
treeb4562f51a5378eee0550b01a9a54dd3c36ba7961 /addressbook/gui
parent8ddf5945c831e025224138bdcba64e1ce1e38893 (diff)
downloadgsoc2013-evolution-742bc235c0a29798db53c58a71e09bdb0a8764b1.tar.gz
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/gui')
-rw-r--r--addressbook/gui/component/addressbook-component.c29
1 files changed, 16 insertions, 13 deletions
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);
}