Another fix would be `$path == ''` instead of the whole expression