Skip to content

Commit

Permalink
Merge pull request #159 from FLuzzi-csw/fluzzi/bds_exes
Browse files Browse the repository at this point in the history
fix delphi directory retrieval
  • Loading branch information
viniciussanchez authored Apr 4, 2024
2 parents c7b74f5 + 13c7d50 commit 01abc4f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions utils/dcc32/dcc32.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ func GetDcc32DirByCmd() []string {

outputStr := strings.ReplaceAll(string(output), "\t", "")
outputStr = strings.ReplaceAll(outputStr, "\r", "")
outputStr = strings.ReplaceAll(outputStr, "\n", "")

if len(outputStr) == 0 {
if len(strings.ReplaceAll(outputStr, "\n", "")) == 0 {
return []string{}
}

installations := strings.Split(outputStr, "\n")
for key, value := range installations {
installations[key] = filepath.Dir(value)
installations := []string{}
for _, value := range strings.Split(outputStr, "\n") {
if len(strings.TrimSpace(value)) > 0 {
installations = append(installations, filepath.Dir(value))
}
}

return installations
Expand Down

0 comments on commit 01abc4f

Please sign in to comment.