Skip to content

Commit

Permalink
simpler logic, clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
mgree committed Jan 27, 2025
1 parent ab9cb4a commit c74c150
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions try
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,8 @@ try() {
for lower_dir in $LOWER_DIRS
do
temp_mountpoint="$lower_dir/upperdir$mountpoint"
if [ -n "$new_mountpoint" ]
then
# If new_mountpoint is not empty, append : and the temp_mountpoint
new_mountpoint="$new_mountpoint:$temp_mountpoint"
else
# If new_mountpoint is empty, just set it to temp_mountpoint
new_mountpoint="$temp_mountpoint"
fi
# Make sure we put : between, but not at the beginning
new_mountpoint="${new_mountpoint:+$new_mountpoint:}$temp_mountpoint"
done
IFS=$OLDIFS
# Add the original mountpoint at the end
Expand Down Expand Up @@ -213,7 +207,7 @@ do
##
## MMG 2025-01-27
## There used to be more complicated logic here using `findmnt`, but we currently
## just build unions for every nested mount.
## just build unions for every mount in the root.
if [ -z "$UNION_HELPER" ]
then
Expand Down

0 comments on commit c74c150

Please sign in to comment.