mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
Fix debug bundle temp file creation on Android
Use app-provided cache directory for os.CreateTemp instead of os.TempDir() which resolves to /data/local/tmp/ on Android — a directory not writable by regular apps. Thread TempDir through GeneratorDependencies -> BundleGenerator and MobileDependency -> EngineConfig so the Android client can pass its cache directory from PlatformFiles.CacheDir().
This commit is contained in:
@@ -140,6 +140,7 @@ type EngineConfig struct {
|
||||
ProfileConfig *profilemanager.Config
|
||||
|
||||
LogPath string
|
||||
TempDir string
|
||||
}
|
||||
|
||||
// EngineServices holds the external service dependencies required by the Engine.
|
||||
@@ -1095,6 +1096,7 @@ func (e *Engine) handleBundle(params *mgmProto.BundleParameters) (*mgmProto.JobR
|
||||
StatusRecorder: e.statusRecorder,
|
||||
SyncResponse: syncResponse,
|
||||
LogPath: e.config.LogPath,
|
||||
TempDir: e.config.TempDir,
|
||||
ClientMetrics: e.clientMetrics,
|
||||
RefreshStatus: func() {
|
||||
e.RunHealthProbes(true)
|
||||
|
||||
Reference in New Issue
Block a user