[evolution-data-server/gnome-3-2] Bug #620382 - Do not delete also directory for custom local calendars
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-2] Bug #620382 - Do not delete also directory for custom local calendars
- Date: Fri, 30 Sep 2011 12:40:42 +0000 (UTC)
commit 673c4e4cf9bc986f9e05e46a7201624b9bbd0224
Author: Milan Crha <mcrha redhat com>
Date: Fri Sep 30 14:40:17 2011 +0200
Bug #620382 - Do not delete also directory for custom local calendars
calendar/backends/file/e-cal-backend-file.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c
index 40fcf92..060eca7 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -1361,6 +1361,7 @@ e_cal_backend_file_remove (ECalBackendSync *backend,
{
ECalBackendFile *cbfile;
ECalBackendFilePrivate *priv;
+ ESource *source;
gchar *str_uri = NULL, *dirname = NULL;
gchar *full_path = NULL;
const gchar *fname;
@@ -1378,6 +1379,12 @@ e_cal_backend_file_remove (ECalBackendSync *backend,
goto done;
}
+ source = e_cal_backend_get_source (E_CAL_BACKEND (backend));
+ if (!source || e_source_get_property (source, "custom-file")) {
+ /* skip file and directory removal for custom calendars */
+ goto done;
+ }
+
if (g_access (str_uri, W_OK) != 0) {
err = EDC_ERROR (PermissionDenied);
goto done;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]