From ea744b1cf5c124595152f6eff28ee42383d63ba5 Mon Sep 17 00:00:00 2001 From: gliargovas Date: Wed, 11 Oct 2023 16:32:06 -0600 Subject: [PATCH] Remove unnecessary empty merge dir check --- try | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/try b/try index b5b916e4..1ea3b25a 100755 --- a/try +++ b/try @@ -68,18 +68,14 @@ try() { for lower_dir in $LOWER_DIRS do temp_mountpoint="$lower_dir/upperdir$mountpoint" - # Check if the new mountpoint is a directory and is non-empty - if [ -d "$temp_mountpoint" ] && [ "$(find "$temp_mountpoint" -mindepth 1 -maxdepth 1 -print -quit)" ]; then - 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 + 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 done - IFS=$OLDIFS # Add the original mountpoint at the end new_mountpoint="${new_mountpoint:+$new_mountpoint:}$mountpoint"