[gjs: 1/2] overrides/Gio: Fix _LocalFilePrototype




commit ec9385b89cb2bce0615093c3c957cbbb5ea6b769
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Mar 24 23:30:19 2021 +0100

    overrides/Gio: Fix _LocalFilePrototype
    
    Recent GIO versions return a GDummyFile for '', which isn't the prototype
    people are expecting to promisify when using _LocalFilePrototype.

 modules/core/overrides/Gio.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/modules/core/overrides/Gio.js b/modules/core/overrides/Gio.js
index 10872efb..d51738e0 100644
--- a/modules/core/overrides/Gio.js
+++ b/modules/core/overrides/Gio.js
@@ -495,7 +495,7 @@ function _init() {
     Gio._promisify = _promisify;
 
     // Temporary Gio.File.prototype fix
-    Gio._LocalFilePrototype = Gio.File.new_for_path('').constructor.prototype;
+    Gio._LocalFilePrototype = Gio.File.new_for_path('/').constructor.prototype;
 
     // Override Gio.Settings and Gio.SettingsSchema - the C API asserts if
     // trying to access a nonexistent schema or key, which is not handy for


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]