Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

Fix setup directory for Windows binary

Matthew Kilgore8f440e2a648f
diff --git a/backend/app/api/setup.go b/backend/app/api/setup.go
index 08164c5d..ecc7bad0 100644
--- a/backend/app/api/setup.go
+++ b/backend/app/api/setup.go
@@ -21,6 +21,7 @@ func setupStorageDir(cfg *config.Config) {
if err != nil {
log.Fatal().Err(err).Msg("failed to get absolute path for storage connection string")
}
+ absBase = strings.ReplaceAll(absBase, "\\", "/")
storageDir := filepath.Join(absBase, cfg.Storage.PrefixPath)
storageDir = strings.ReplaceAll(storageDir, "\\", "/")
if !strings.HasPrefix(storageDir, absBase+"/") && storageDir != absBase {