Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cli/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"log/slog"
"os"
"path/filepath"
"regexp"
"strings"

resolver "github.com/satisfactorymodding/ficsit-resolver"
Expand Down Expand Up @@ -173,8 +174,8 @@ func (p *Profiles) Save() error {
}

profilesFile := filepath.Join(viper.GetString("local-dir"), viper.GetString("profiles-file"))

slog.Info("saving profiles", slog.String("path", profilesFile))
re := regexp.MustCompile(`(Users\\).*(\\)`)
slog.Info("saving profiles", slog.String("path", re.ReplaceAllString(profilesFile, `Users\*****\`)))

profilesJSON, err := json.MarshalIndent(p, "", " ")
if err != nil {
Expand Down
Loading