diff options
author | Slack Coder <slackcoder@server.ky> | 2025-01-28 15:58:04 -0500 |
---|---|---|
committer | Slack Coder <slackcoder@server.ky> | 2025-01-29 06:27:23 -0500 |
commit | f69b4389539e0b04a47bc37facdb03bdd3cd3c9b (patch) | |
tree | b226187b69e1541cc4537668b923b1f1723dbfdc | |
parent | 6379cb0c0fa848f61ec30c434aed2d6b81d4ad49 (diff) | |
download | sbotools2-f69b4389539e0b04a47bc37facdb03bdd3cd3c9b.tar.xz |
Ensure home directory is an absolute path
-rw-r--r-- | ChangeLog.md | 1 | ||||
-rw-r--r-- | SBO-Lib/lib/SBO/Lib/Util.pm | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog.md b/ChangeLog.md index 15d2ead..7d6d551 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. ### Fixed + - Expect SBO_HOME to be an absolute path. Thanks pghvlaans! - Tests under 't/' for 15.0. ## [2.7.2] - 2024-12-03 diff --git a/SBO-Lib/lib/SBO/Lib/Util.pm b/SBO-Lib/lib/SBO/Lib/Util.pm index 3c611b8..073ba0a 100644 --- a/SBO-Lib/lib/SBO/Lib/Util.pm +++ b/SBO-Lib/lib/SBO/Lib/Util.pm @@ -422,7 +422,11 @@ sub read_config { } else { warn "Unable to open $conf_file.\n" if -f $conf_file; } + $config{SBO_HOME} = '/usr/sbo' if $config{SBO_HOME} eq 'FALSE'; + unless ($config{SBO_HOME} =~ qr#^(/|$)#) { + usage_error( "The configuration parameter SBO_HOME must be an absolute path."); + } } =head2 script_error |