Closed alarner closed 1 year ago
Fixes #324
Nodes path.parse does not treat dot files as an extension. For example path.parse('.gitignore') results in the following:
path.parse
path.parse('.gitignore')
{ root: '', dir: '', base: '.gitignore', ext: '', name: '.gitignore' }
Because ext is an empty string rather than '.gitignore', extensions were not being stripped properly from dot files due to the path.parse(maybeFile.name).ext !== "" clause.
ext
path.parse(maybeFile.name).ext !== ""
Is there anything I process need to follow to get this reviewed?
Fixes #324
Nodes
path.parse
does not treat dot files as an extension. For examplepath.parse('.gitignore')
results in the following:{ root: '', dir: '', base: '.gitignore', ext: '', name: '.gitignore' }
Because
ext
is an empty string rather than '.gitignore', extensions were not being stripped properly from dot files due to thepath.parse(maybeFile.name).ext !== ""
clause.