Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27899] Common: path.parse with a file extension but no directory results in an invalid dir value

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 9.0.1, Release 9.0.2
Fix Version/sn/a
ComponentsAndroid, iOS
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2020-05-18T12:36:43.000+0000
Updated2021-02-22T20:01:43.000+0000

Description

Description

When calling path.parse('a.js' the dir value in the returned object is dir: 'a.j' which is incorrect, the value should be dir: ''

Steps to reproduce

1. Add console.log(path.parse('a.js')); to your app.js and build

Actual

[INFO] { root: '', dir: 'a.j', base: 'a.js', ext: '.js', name: 'a' }

Expected

[INFO] { root: '', dir: ''. base: '', ext: '.js', name: 'a' }

Comments

No comments

JSON Source