Merge pull request #18206 from desktop/fix-ignore-folders-on-windows

Use forward slash for path separation splicing in generating ignore folder paths
This commit is contained in:
tidy-dev 2024-02-23 07:37:40 -05:00 committed by GitHub
commit 5c494415c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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