gnome-shell/gnome-shell-no-file_get_contents.patch

31 lines
1002 B
Diff

From bfd344cdece5de6230ff611e3e1c66d90913dc47 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Wed, 11 May 2011 18:19:24 +0000
Subject: Use Shell.get_file_contents_utf8_sync over GLib.file_get_contents
We need to fix the latter to return a byte array, which gjs doesn't
deal with well right now.
https://bugzilla.gnome.org/show_bug.cgi?id=649981
---
(limited to 'js/ui/placeDisplay.js')
diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js
index 59ca4a6..9354247 100644
--- a/js/ui/placeDisplay.js
+++ b/js/ui/placeDisplay.js
@@ -268,10 +268,7 @@ PlacesManager.prototype = {
if (!GLib.file_test(this._bookmarksPath, GLib.FileTest.EXISTS))
return;
- let [success, bookmarksContent, len] = GLib.file_get_contents(this._bookmarksPath);
-
- if (!success)
- return;
+ let bookmarksContent = Shell.get_file_contents_utf8_sync(this._bookmarksPath);
let bookmarks = bookmarksContent.split('\n');
--
cgit v0.9