From 09f9826760316c35cb229bde4d065c89290c6076 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 8 May 2025 09:27:50 +0200 Subject: [PATCH] global-functions: $MkDir: :do ... on-error=... -> :onerror ... do=... --- global-functions.rsc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/global-functions.rsc b/global-functions.rsc index 35dd0e0..271e3a2 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -894,11 +894,11 @@ $LogPrint info $0 ("Creating disk of type tmpfs."); $RmDir "tmpfs"; - :do { + :onerror Err { /disk/add slot=tmpfs type=tmpfs tmpfs-max-size=([ /system/resource/get total-memory ] / 3); $WaitForFile "tmpfs"; - } on-error={ - $LogPrint warning $0 ("Creating disk of type tmpfs failed!"); + } do={ + $LogPrint warning $0 ("Creating disk of type tmpfs failed: " . $Err); :return false; } :return true; @@ -923,11 +923,11 @@ } } - :do { + :onerror Err { /file/add type="directory" name=$Path; $WaitForFile $Path; - } on-error={ - $LogPrint warning $0 ("Making directory '" . $Path . "' failed!"); + } do={ + $LogPrint warning $0 ("Making directory '" . $Path . "' failed: " . $Err); :return false; }