Skip to content

Commit 8dca01a

Browse files
committed
plex: fix a bug with getting all drives
Signed-off-by: Simon L. <[email protected]>
1 parent 2f1a07e commit 8dca01a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

not-supported/plexmediaserver.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ DIRECTORIES=$(find /mnt/ -mindepth 1 -maxdepth 2 -type d | grep -v "/mnt/ncdata"
7171
mapfile -t DIRECTORIES <<< "$DIRECTORIES"
7272
for directory in "${DIRECTORIES[@]}"
7373
do
74+
# Open directory to make sure that it is accessible
75+
ls "$directory" &>/dev/null
76+
77+
# Continue with the logic
7478
if mountpoint -q "$directory" && [ "$(stat -c '%a' "$directory")" = "770" ]
7579
then
7680
if [ "$(stat -c '%U' "$directory")" = "www-data" ] && [ "$(stat -c '%G' "$directory")" = "www-data" ]

0 commit comments

Comments
 (0)