Use forward slash for path separation splicing

This commit is contained in:
tidy-dev 2024-02-22 10:35:48 -05:00
parent a9369307c8
commit bcf53dd477

View file

@ -571,7 +571,9 @@ export class ChangesList extends React.Component<
enabled,
})
const pathComponents = path.split(Path.sep).slice(0, -1)
// Even on Windows, the path separator is '/' for git operations so cannot
// use Path.sep
const pathComponents = path.split('/').slice(0, -1)
if (pathComponents.length > 0) {
const submenu = pathComponents.map((_, index) => {
const label = `/${pathComponents