source: node_modules/tar/lib/normalize-windows-path.js@ 62b2964

finki-main main
Last change on this file since 62b2964 was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago

Initial commit

  • Property mode set to 100644
File size: 410 bytes
Line 
1// on windows, either \ or / are valid directory separators.
2// on unix, \ is a valid character in filenames.
3// so, on windows, and only on windows, we replace all \ chars with /,
4// so that we can use / as our one and only directory separator char.
5
6const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform
7module.exports = platform !== 'win32' ? p => p
8 : p => p && p.replace(/\\/g, '/')
Note: See TracBrowser for help on using the repository browser.