The if control word takes a list of expressions. From ":",y,"/" in the second, y must be a string, and appears to be a filepath. The first (test) expression is truthy: true unless it evaluates to 0, which it will do if y is an empty string.
Without knowing the script, it looks like l is a flag indicating whether something perhaps L? has been set, if not from y, then by evaluating ld d.