Shell quoting in move_widevine_data.sh
Add double quotes to prevent globbing and word splitting.
Bug: crbug.com/1168550
Test: Create /data/mediadrm files and observe they are moved
Change-Id: I8d1cd70971588f903657825ea6e10c019954f403
(cherry picked from commit 8649f7a952b7e4f8edd17edfca0b0962e2fb2662)
(cherry picked from commit 84d0d73be5)
This commit is contained in:
committed by
Josh Horwich
parent
4c4e746e57
commit
63eae1f4a4
@@ -9,8 +9,8 @@ if [ ! -f "$FILES_MOVED" ]; then
|
||||
for i in "$SRC_PATH/IDM"*; do
|
||||
dest_path=$DEST_PATH/"${i#$SRC_PATH/}"
|
||||
if [ -d "$i" ]; then
|
||||
mkdir -p $dest_path -m 700
|
||||
mv $i "$DEST_PATH"
|
||||
mkdir -p "$dest_path" -m 700
|
||||
mv "$i" "$DEST_PATH"
|
||||
for file in ${dest_path}/${L3_FILE_PATTERN}; do
|
||||
[ -e "${file}" ] || continue
|
||||
# We need to move any L3 files in the IDM folder to the L3 subfolder.
|
||||
@@ -18,7 +18,7 @@ if [ ! -f "$FILES_MOVED" ]; then
|
||||
mkdir -p "${l3_dir}" -m 700
|
||||
mv "${file}" "${l3_dir}"
|
||||
done
|
||||
find $dest_path -print0 | while IFS= read -r -d '' file
|
||||
find "$dest_path" -print0 | while IFS= read -r -d '' file
|
||||
do
|
||||
chgrp media "$file"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user