Fix: Uniquely determine the mount point in GetDevice
This commit is contained in:
parent
06dda19cb0
commit
6328fdf5c7
@ -1039,13 +1039,10 @@ ShowDeviceWarning() {
|
||||
} # ShowDeviceWarning
|
||||
|
||||
GetDevice() {
|
||||
TestPath=$(findmnt --noheadings --output SOURCE,FSTYPE "$1" --uniq)
|
||||
if [[ -z ${TestPath} ]]; then
|
||||
[[ -n "${1%/*}" ]] \
|
||||
&& GetDevice "${1%/*}" \
|
||||
|| GetDevice "/"
|
||||
else
|
||||
if TestPath=$(findmnt --noheadings --output SOURCE,FSTYPE --target "$1" --uniq); then
|
||||
echo "${TestPath}"
|
||||
else
|
||||
echo "Bud Path: $1" >&2; exit 1
|
||||
fi
|
||||
} # GetDevice
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user