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 95
95
# userdata_home/mod.
96
96
if [[ -n " $shortcuts_dir " && -d " $shortcuts_dir " ]]
97
97
then
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 " ]]
106
105
then
107
106
rm -f " $file "
107
+ else
108
+ if [[ -n " $userdata_home " && " $target " == " $userdata_home " /" $mod " ]]
109
+ then
110
+ rm -f " $file "
111
+ fi
108
112
fi
109
- fi
110
- done
113
+ done <<< " $shortcuts "
114
+ fi
111
115
fi
112
116
113
117
# Delete the corresponding subdirectory of basedir, unless configured not to.
You can’t perform that action at this time.
0 commit comments