Sandertv / gophertunnel

General purpose library for Minecraft Bedrock Edition software written in Go
MIT License
419 stars 95 forks source link

Temp resource pack path is invalid on android #151

Closed HashimTheArab closed 1 year ago

HashimTheArab commented 1 year ago

https://github.com/Sandertv/gophertunnel/blob/b1dfb04b1de2878d8bb20252b49ed4e3efe176a0/minecraft/resource/pack.go#L62

On android the path this ends up using is "/data/local/tmp" which is inaccessible unless the user has a rooted device

I'm currently using os.UserConfigDir() to get around this locally

Sandertv commented 1 year ago

I think it might be more appropriate to use os.UserCacheDir() for this. Do you reckon that would work on android?

HashimTheArab commented 1 year ago

yep that works

11-24 14:40:18.425 9627 10619 I localhost.lunar: cache dir: /data/user/0/localhost.lunar/files/cache 11-24 14:40:18.998 9627 9691 I localhost.lunar: config dir: /data/user/0/localhost.lunar/files/config

HashimTheArab commented 1 year ago

uhh hold on that