[gjs: 3/11] examples: Fix deprecated ByteArray usage



commit f4a776b09e460c11aeb883696bb3177686ae116e
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Oct 13 15:08:34 2018 -0700

    examples: Fix deprecated ByteArray usage

 examples/gio-cat.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/examples/gio-cat.js b/examples/gio-cat.js
index 93943caf..d0b81164 100644
--- a/examples/gio-cat.js
+++ b/examples/gio-cat.js
@@ -1,4 +1,5 @@
 
+const ByteArray = imports.byteArray;
 const GLib = imports.gi.GLib;
 const Gio = imports.gi.Gio;
 
@@ -15,7 +16,7 @@ function cat(filename) {
             loop.quit();
             return;
         }
-        print(contents);
+        print(ByteArray.toString(contents));
         loop.quit();
     });
 


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