[gjs/ewlsh/interface-resolution: 12/12] 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: 12/12] overrides: Override replace_contents_async in Gio.File
- Date: Thu, 26 Aug 2021 04:52:15 +0000 (UTC)
commit 38e3a64e7f6848e4eebbd7cb2a4efeedb7be5690
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]