[gnome-shell] Bug 592507 - Javascript exception when ~/.gtk-bookmarks is missing



commit 7fb8e2d0ef88be90444a6a1746b914aca6897623
Author: Thomas Wood <thos gnome org>
Date:   Thu Aug 20 21:39:04 2009 +0100

    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 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/places.js b/js/ui/places.js
index b122c5d..12bb8bd 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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]