From 0bb644e2a37ad63d86fe3b313d5f33059b3bdc43 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 1 Jan 2022 23:18:03 -0400 Subject: fix backwards slashes in hrefs on windows... ...while also not breaking the way we use the to() functions for actual output write paths! --- src/upd8.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/upd8.js') diff --git a/src/upd8.js b/src/upd8.js index 29063f8..daef145 100755 --- a/src/upd8.js +++ b/src/upd8.js @@ -2023,8 +2023,8 @@ writePage.paths = (baseDirectory, fullKey, directory = '', { const [ groupKey, subKey ] = fullKey.split('.'); const pathname = (groupKey === 'localized' && baseDirectory - ? urls.from('shared.root').to('localizedWithBaseDirectory.' + subKey, baseDirectory, directory) - : urls.from('shared.root').to(fullKey, directory)); + ? urls.from('shared.root').toDevice('localizedWithBaseDirectory.' + subKey, baseDirectory, directory) + : urls.from('shared.root').toDevice(fullKey, directory)); // Needed for the rare directory which itself contains a slash, e.g. for // listings, with directories like 'albums/by-name'. @@ -2048,7 +2048,7 @@ function writeSymlinks() { ]); async function link(directory, urlKey) { - const pathname = urls.from('shared.root').to(urlKey); + const pathname = urls.from('shared.root').toDevice(urlKey); const file = path.join(outputPath, pathname); try { await unlink(file); -- cgit 1.3.0-6-gf8a5