File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 9595# userdata_home/mod.
9696if [[ -n " $shortcuts_dir " && -d " $shortcuts_dir " ]]
9797then
98- for file in $( ls -1 " $shortcuts_dir " /* .quake 2> /dev/null)
99- do
100- target=$( gamedir_for_shortcut " $file " )
101- if [[ " $target " == " $basedir " /" $mod " ]]
102- then
103- rm -f " $file "
104- else
105- if [[ -n " $userdata_home " && " $target " == " $userdata_home " /" $mod " ]]
98+ shortcuts=$( ls -1d " $shortcuts_dir " /* .quake 2> /dev/null)
99+ if [[ -n " $shortcuts " ]]
100+ then
101+ while IFS= read -r file
102+ do
103+ target=$( gamedir_for_shortcut " $file " )
104+ if [[ " $target " == " $basedir " /" $mod " ]]
106105 then
107106 rm -f " $file "
107+ else
108+ if [[ -n " $userdata_home " && " $target " == " $userdata_home " /" $mod " ]]
109+ then
110+ rm -f " $file "
111+ fi
108112 fi
109- fi
110- done
113+ done <<< " $shortcuts "
114+ fi
111115fi
112116
113117# Delete the corresponding subdirectory of basedir, unless configured not to.
You can’t perform that action at this time.
0 commit comments