From 2a1ae7dd6ba871a3414ce3abcfd001db5ca7e8c8 Mon Sep 17 00:00:00 2001 From: ehsan shariati Date: Sun, 3 Mar 2024 09:06:32 -0500 Subject: [PATCH] Update main.go --- modules/initipfs/main.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/initipfs/main.go b/modules/initipfs/main.go index 444cf11..f9553ca 100644 --- a/modules/initipfs/main.go +++ b/modules/initipfs/main.go @@ -345,17 +345,7 @@ func updateIPFSConfigIdentity(ipfsCfg *IPFSConfig, cfg ConfigYAML) { } func updateDatastorePath(ipfsCfg *IPFSConfig, newPath string, apiIp string) { - // Ensure Datastore.Spec.Child is a pointer to avoid copying - if ipfsCfg.Datastore.Spec.Child == nil { - ipfsCfg.Datastore.Spec.Child = &struct { - Path string `json:"path"` - SyncWrites bool `json:"syncWrites"` - Truncate bool `json:"truncate"` - Type string `json:"type"` - }{} - } - - // Modify in-place using the pointer + // Update the path to the new specified path ipfsCfg.Datastore.Spec.Child.Path = newPath ipfsCfg.Datastore.Spec.Child.SyncWrites = true // Update the path to the new specified path