[gjs/ewlsh/interface-resolution: 63/64] overrides: Override replace_contents_async in Gio.File




commit fefbe42c4afae487401152ce15ca275e3265ff20
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]