Skip to content

Commit

Permalink
#188 [LS] - Handle tor config path error properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
steffano0 committed Jan 20, 2025
1 parent 0b71fac commit 683c670
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
5 changes: 1 addition & 4 deletions tor/search_binary_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ func isThereConfiguredTorBinary(path string) (b *binary, err error) {
}

if !filesystemf.IsADirectory(path) {
// We ommit the error here because it's ok while
// we are checking multiple possible paths where
// the Tor binary can be
b, _ = getBinaryForPath(path)
b, err = getBinaryForPath(path)
return
}

Expand Down
7 changes: 2 additions & 5 deletions tor/search_binary_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,13 @@ func isThereConfiguredTorBinary(path string) (b *binary, err error) {
}

if !filesystemf.IsADirectory(path) {
// We ommit the error here because it's ok while
// we are checking multiple possible paths where
// the Tor binary can be
b, _ = getBinaryForPath(path)
b, err = getBinaryForPath(path)
return
}

torExecutablePath, _ := findTorExecutable(path)

b, _ = getBinaryForPath(torExecutablePath)
b, err = getBinaryForPath(torExecutablePath)
return
}

Expand Down

0 comments on commit 683c670

Please sign in to comment.