sane-sandboxed: be more strict internally about keeping paths
var as absolute-paths
This commit is contained in:
@@ -301,14 +301,14 @@ tryPath() {
|
||||
if [ "$_how" = "existing" ]; then
|
||||
# the caller wants to access either a file, or a directory (possibly a symlink to such a thing)
|
||||
if [ -e "$_path" ]; then
|
||||
cliPathArgs+=("$_path")
|
||||
cliPathArgs+=("$(relativeTo "$PWD" "$_path")")
|
||||
true
|
||||
fi
|
||||
false
|
||||
elif [ "$_how" = "existingFile" ]; then
|
||||
# the caller wants to access a file, and explicitly *not* a directory (though it could be a symlink *to a file*)
|
||||
if [ -f "$_path" ]; then
|
||||
cliPathArgs+=("$_path")
|
||||
cliPathArgs+=("$(relativeTo "$PWD" "$_path")")
|
||||
true
|
||||
fi
|
||||
false
|
||||
|
Reference in New Issue
Block a user