print file extensions "N"

I modified the firmware as follows
if(!filenameIsDir)
{
if(p.name[8]!=‘G’) continue;
if(p.name[8]!=‘N’) continue;
if(p.name[9]==’~’) continue;
}
// if (!filenameIsDir && (p.name[8] != ‘G’ || p.name[8] != ‘N’ || p.name[9] == ‘~’)) continue;
I tried both Syntax I can not see any files just disk information?
any other place I need to change?