Skip comments in loadPower function
A new condition has been added to the loadPower function in src/octopower to identify and skip lines that start with //, which are treated as comments. Previously, the function validated and processed all lines without filtering out comments.
This commit is contained in:
parent
223c972795
commit
ed1cd4fffa
@ -228,7 +228,9 @@ function setPowers() {
|
|||||||
# load the power
|
# load the power
|
||||||
function loadPower() {
|
function loadPower() {
|
||||||
local guid="$1"
|
local guid="$1"
|
||||||
if [ ${#guid} -ge 30 ] && validateGuid "${guid}"; then
|
if [[ $guid == "//"* ]]; then
|
||||||
|
return 0 # skip comments ;)
|
||||||
|
elif [ ${#guid} -ge 30 ] && validateGuid "${guid}"; then
|
||||||
setPower "$guid" || return 19
|
setPower "$guid" || return 19
|
||||||
loadChildrenPowers "$guid" || return 19
|
loadChildrenPowers "$guid" || return 19
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user