aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog5
-rw-r--r--shell/e-shell-importer.c11
2 files changed, 16 insertions, 0 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 8f0116e004..290ca8765a 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,8 @@
+2001-09-12 Chris Toshok <toshok@ximian.com>
+
+ * e-shell-importer.c (start_import): only allow importing to
+ /local folders.
+
2001-09-12 Ettore Perazzoli <ettore@ximian.com>
[Fix #4962, "Highlighting is left after a drag".]
diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c
index a22d44732b..7cd8ba10db 100644
--- a/shell/e-shell-importer.c
+++ b/shell/e-shell-importer.c
@@ -44,6 +44,7 @@
#include "e-shell.h"
#include "e-shell-view.h"
+#include "e-local-storage.h" /* for E_LOCAL_STORAGE_NAME */
#include "e-shell-folder-selection-dialog.h"
#include "importer/evolution-importer-client.h"
@@ -341,6 +342,7 @@ start_import (const char *folderpath,
ImporterComponentData *icd;
char *label;
char *real_iid;
+ char *localpath;
struct stat buf;
if (stat (filename, &buf) == -1) {
@@ -353,6 +355,15 @@ start_import (const char *folderpath,
return;
}
+ /* Only allow importing to /local */
+ localpath = "/" E_LOCAL_STORAGE_NAME "/";
+ if (strncmp (folderpath, localpath, strlen (localpath))) {
+ char *message;
+ e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
+ _("You may only import to local folders"));
+ return;
+ }
+
if (iid == NULL || strcmp (iid, "Automatic") == 0) {
/* Work out the component to use */
real_iid = get_iid_for_filetype (filename);