Work around GioFile promisify bug caused by GLib 2.68

This commit is contained in:
Rafał Dzięgiel
2021-04-01 22:05:43 +02:00
parent 7f69bee11c
commit e68a7fe31a

View File

@@ -4,9 +4,13 @@ const Misc = imports.src.misc;
const { debug } = Debug; const { debug } = Debug;
Gio._promisify(Gio._LocalFilePrototype, 'load_bytes_async', 'load_bytes_finish'); /* FIXME: Use Gio._LocalFilePrototype once we are safe to assume
Gio._promisify(Gio._LocalFilePrototype, 'make_directory_async', 'make_directory_finish'); * that GJS with https://gitlab.gnome.org/GNOME/gjs/-/commit/ec9385b8 is used. */
Gio._promisify(Gio._LocalFilePrototype, 'replace_contents_bytes_async', 'replace_contents_finish'); const LocalFilePrototype = Gio.File.new_for_path('/').constructor.prototype;
Gio._promisify(LocalFilePrototype, 'load_bytes_async', 'load_bytes_finish');
Gio._promisify(LocalFilePrototype, 'make_directory_async', 'make_directory_finish');
Gio._promisify(LocalFilePrototype, 'replace_contents_bytes_async', 'replace_contents_finish');
function createCacheDirPromise() function createCacheDirPromise()
{ {