[gjs/ewlsh/interface-resolution: 2/2] overrides: Override replace_contents_async in Gio.File
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/ewlsh/interface-resolution: 2/2] overrides: Override replace_contents_async in Gio.File
- Date: Thu, 26 Aug 2021 01:11:15 +0000 (UTC)
commit 90da0e256b6f1be4522baf68a1aa2bad6b31a21f
Author: Evan Welsh <contact evanwelsh com>
Date: Wed Aug 25 18:09:23 2021 -0700
overrides: Override replace_contents_async in Gio.File
Fixes #192
modules/core/overrides/Gio.js | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/modules/core/overrides/Gio.js b/modules/core/overrides/Gio.js
index 6799b550..90b62777 100644
--- a/modules/core/overrides/Gio.js
+++ b/modules/core/overrides/Gio.js
@@ -509,6 +509,10 @@ function _init() {
// Temporary Gio.File.prototype fix
Gio._LocalFilePrototype = Gio.File.new_for_path('/').constructor.prototype;
+ Gio.File.prototype.replace_contents_async = function replace_contents_async(contents, etag, make_backup,
flags, cancellable, callback) {
+ return this.replace_contents_bytes_async(contents, etag, make_backup, flags, cancellable, callback);
+ };
+
// Override Gio.Settings and Gio.SettingsSchema - the C API asserts if
// trying to access a nonexistent schema or key, which is not handy for
// shell-extension writers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]