@@ -177,8 +177,8 @@ download_jre() {
177177 # Clean up archive
178178 rm " $ARCHIVE_FILE "
179179
180- chmod -R u+r " $EXTRACT_DIR " 2> /dev/null || true
181- chmod -R a+r " $EXTRACT_DIR " 2> /dev/null || true
180+ find " $EXTRACT_DIR " -type f -exec chmod u+r {} \; 2> /dev/null || true
181+ find " $EXTRACT_DIR " -type f -exec chmod a+r {} \; 2> /dev/null || true
182182 find " $EXTRACT_DIR " -type d -exec chmod u+rx {} \; 2> /dev/null || true
183183 find " $EXTRACT_DIR " -type d -exec chmod a+rx {} \; 2> /dev/null || true
184184
@@ -238,8 +238,9 @@ create_minimal_jre() {
238238 --output " $OUTPUT_DIR " 2>&1 | grep -v " Warning" || [ ${PIPESTATUS[0]} -eq 0 ]; then
239239
240240 if [ -d " $OUTPUT_DIR " ]; then
241- chmod -R u+r " $OUTPUT_DIR " 2> /dev/null || true
242- chmod -R a+r " $OUTPUT_DIR " 2> /dev/null || true
241+ # Set permissions explicitly on all files and directories
242+ find " $OUTPUT_DIR " -type f -exec chmod u+r {} \; 2> /dev/null || true
243+ find " $OUTPUT_DIR " -type f -exec chmod a+r {} \; 2> /dev/null || true
243244 find " $OUTPUT_DIR " -type d -exec chmod u+rx {} \; 2> /dev/null || true
244245 find " $OUTPUT_DIR " -type d -exec chmod a+rx {} \; 2> /dev/null || true
245246
@@ -262,9 +263,9 @@ copy_full_jre() {
262263
263264 cp -r " $SOURCE_JRE " " $OUTPUT_DIR "
264265
265- # Fix permissions after copying
266- chmod -R u+r " $OUTPUT_DIR " 2> /dev/null || true
267- chmod -R a+r " $OUTPUT_DIR " 2> /dev/null || true
266+ # Fix permissions after copying - set explicitly on all files and directories
267+ find " $OUTPUT_DIR " -type f -exec chmod u+r {} \; 2> /dev/null || true
268+ find " $OUTPUT_DIR " -type f -exec chmod a+r {} \; 2> /dev/null || true
268269 find " $OUTPUT_DIR " -type d -exec chmod u+rx {} \; 2> /dev/null || true
269270 find " $OUTPUT_DIR " -type d -exec chmod a+rx {} \; 2> /dev/null || true
270271
@@ -279,9 +280,8 @@ set_java_permissions() {
279280 print_info " Setting permissions on JRE files..." >&2
280281
281282 # First, ensure all files and directories are readable
282- # This is critical for Tauri's build process which checks file changes
283- chmod -R u+r " $JRE_PATH " 2> /dev/null || true
284- chmod -R a+r " $JRE_PATH " 2> /dev/null || true
283+ find " $JRE_PATH " -type f -exec chmod u+r {} \; 2> /dev/null || true
284+ find " $JRE_PATH " -type f -exec chmod a+r {} \; 2> /dev/null || true
285285 find " $JRE_PATH " -type d -exec chmod u+rx {} \; 2> /dev/null || true
286286 find " $JRE_PATH " -type d -exec chmod a+rx {} \; 2> /dev/null || true
287287
0 commit comments