Evaluator: Root("") will throw error

Root(path) will throw an error if path is empty or a special node like This PC.

Wouldn't it be better if it just returned an empty string?

Currently, I need to use extra checks because variables like filepath and dest are frequently empty, e.g.:

@output:source={=Len(source) ? Root(source) : "none"=}

(Using Len(source) instead of source catches This PC.)

We'll change that in the next beta.

3 Likes