path.normalize does not work correctly in case of a folder that contains .. as part of its name

  • 8.0.0:
  • mac:
  • Subsystem:

When using path.normalize with a folder that has '..' at the end of it, it fails to continue parsing the input correctly.

path.normalize('bar/foo../../')
current output: bar/foo../../
desired output: bar