[gtk+/multiroot-filechooser: 8/30] Prevent access to old locations when using a non-existant root URI.
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/multiroot-filechooser: 8/30] Prevent access to old locations when using a non-existant root URI.
- Date: Wed, 6 Oct 2010 18:35:23 +0000 (UTC)
commit 93a91f91d8d5d934b790aaf57dadfe573e9cedbd
Author: Christian Hammond <chipx86 chipx86 com>
Date: Sat Feb 13 14:45:38 2010 -0800
Prevent access to old locations when using a non-existant root URI.
gtk/gtkfilechooserdefault.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 82dd3ab..50b499a 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -7325,6 +7325,19 @@ gtk_file_chooser_default_update_current_folder (GtkFileChooser *chooser,
return FALSE;
}
+ if (!_gtk_file_chooser_is_file_in_root (GTK_FILE_CHOOSER (impl), file))
+ {
+ g_set_error_literal (error,
+ GTK_FILE_CHOOSER_ERROR,
+ GTK_FILE_CHOOSER_ERROR_BAD_FILENAME,
+ _("Cannot change to folder because it is not "
+ "accessible from this file chooser"));
+
+ g_object_unref (file);
+ profile_end ("end - not accessible within root URI", NULL);
+ return FALSE;
+ }
+
if (impl->update_current_folder_cancellable)
g_cancellable_cancel (impl->update_current_folder_cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]