Skip to content
Merged
Changes from all 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: 4 additions & 1 deletion src/utility/gpg-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@ function getSaveGpgHomedir() {
local -ra params=(gpgDir)
parseFnArgs params "$@" || return $?

if ((${#gpgDir} < 100)); then
# socket path max is on certain systems 108 - longest socket name which is currently S.gpg-agent.browser (20 chars)
# 108 - 20 = 88 - 1 (NUL terminating char) 87 and to be on the safer side we use 85
local -r maxSocketPathLength=85
if ((${#gpgDir} <= maxSocketPathLength)); then
echo "$gpgDir"
else
local tmpDir
Expand Down