diff options
author | Evan Welsh <contact@evanwelsh.com> | 2021-08-25 18:09:23 -0700 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2021-10-15 14:18:38 -0700 |
commit | 0e35b684822efdc8007c54ff2c0ce22d0528f9db (patch) | |
tree | 01c8f2f07cdfc53ab8831e133decf022e54c50f0 /modules | |
parent | 3b477036932782f44be58747f95c69679514b85d (diff) | |
download | gjs-0e35b684822efdc8007c54ff2c0ce22d0528f9db.tar.gz |
overrides: Override replace_contents_async in Gio.File
Fixes #192
Diffstat (limited to 'modules')
-rw-r--r-- | modules/core/overrides/Gio.js | 4 |
1 files changed, 4 insertions, 0 deletions
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 |