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.
This commit is contained in:
Thomas Wood 2009-08-20 21:39:04 +01:00
parent 2d5d54f3cd
commit 7fb8e2d0ef

View File

@ -151,6 +151,9 @@ Places.prototype = {
this._dirsBox.remove_all(); this._dirsBox.remove_all();
if (!GLib.file_test(this._bookmarksPath, GLib.FileTest.EXISTS))
return;
let [success, bookmarksContent, len] = GLib.file_get_contents(this._bookmarksPath); let [success, bookmarksContent, len] = GLib.file_get_contents(this._bookmarksPath);
if (!success) if (!success)