Closed
Description
- Version: v5.10.1
- Platform: Darwin Kernel Version 15.3.0
- Subsystem: path
On OS X and Linux its perfectly legal to use dot '.' in directory name.
Currently path.extname and path.parse handle .
in directory name as a file extension.
e.g.
ext.extname('/Users/Bob.Dev')
> '.Dev'
ext.parse('/Users/John.Smith')
> { root: '/',
dir: '/Users',
base: 'Bob.Dev',
ext: '.Dev',
name: 'Bob' }
I understand that path
don't do any validation. But this behavior is confusing an error prone.