joyent/node — Issue #2526: path.extname does not follow API document when path contains '..'
Author: otakustay
Created: 2012-01-12 15:08:08+00:00
State: open

in (http://nodejs.org/docs/latest/api/path.html#path.extname)[API document] the description of **path.extname** is as below:

> Return the extension of the path, from the **last '.**' to end of string in the last portion of the path. If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.

Note **ext.pathname** should read the **last** `.` character, but if I write

path.extname('..');

it outputs:

'.'

and if I write

path.extname('../')

it outputs:

'./'

it seems that `path.extname` does not work correctly when there are continous sequence of `.` character

I'm using node v0.6.7 for Windows