Skip to content

Commit f80f0d4

Browse files
Update sdk-platform-java/hermetic_build/library_generation/utils/utilities.sh
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 0b4bb2f commit f80f0d4

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

  • sdk-platform-java/hermetic_build/library_generation/utils

sdk-platform-java/hermetic_build/library_generation/utils/utilities.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,11 @@ restore_version_java() {
366366
fi
367367

368368
pushd "${backup_directory}" > /dev/null
369-
for file in $(find . -type f 2>/dev/null); do
370-
if [[ -n "$file" ]]; then
371-
local relative_path="${file#./}"
372-
local target_path="${target_directory}/${relative_path}"
373-
mkdir -p "$(dirname "${target_path}")"
374-
mv "$file" "${target_path}"
375-
fi
369+
find . -type f -print0 | while IFS= read -r -d '' file; do
370+
local relative_path="${file#./}"
371+
local target_path="${target_directory}/${relative_path}"
372+
mkdir -p "$(dirname "${target_path}")"
373+
mv "$file" "${target_path}"
376374
done
377375
popd > /dev/null
378376
}

0 commit comments

Comments
 (0)