From 42bc707f7cf3f98746e3398f9046ae76cc727877 Mon Sep 17 00:00:00 2001 From: CoyAce Date: Thu, 18 Dec 2025 16:03:07 +0800 Subject: [PATCH] app: [Android] document DataDir limitations Document that DataDir is not available before main. References: https://todo.sr.ht/~eliasnaur/gio/229 Signed-off-by: CoyAce Signed-off-by: Elias Naur --- app/app.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/app.go b/app/app.go index ec7ed918..1b76ab9b 100644 --- a/app/app.go +++ b/app/app.go @@ -130,8 +130,8 @@ func NewContext(ops *op.Ops, e FrameEvent) layout.Context { // On iOS NSDocumentDirectory is queried. // For Android Context.getFilesDir is used. // -// BUG: DataDir blocks on Android until init functions -// have completed. +// Note that on Android, DataDir blocks until main is called. +// Don't call it from init functions or global variable initializers. func DataDir() (string, error) { return dataDir() }