From 7fb8e2d0ef88be90444a6a1746b914aca6897623 Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Thu, 20 Aug 2009 21:39:04 +0100 Subject: [PATCH] Bug 592507 - Javascript exception when ~/.gtk-bookmarks is missing Check the file exists before trying to access it and simply return if it is not available. --- js/ui/places.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/ui/places.js b/js/ui/places.js index b122c5d83..12bb8bd17 100644 --- a/js/ui/places.js +++ b/js/ui/places.js @@ -151,6 +151,9 @@ Places.prototype = { this._dirsBox.remove_all(); + if (!GLib.file_test(this._bookmarksPath, GLib.FileTest.EXISTS)) + return; + let [success, bookmarksContent, len] = GLib.file_get_contents(this._bookmarksPath); if (!success)