From e15f2b98896c1c7b0389b7e47421b35ec6e9e948 Mon Sep 17 00:00:00 2001 From: Jonathan Hartley Date: Tue, 4 Jul 2023 00:46:18 -0500 Subject: [PATCH] Fix conversion of paths to use forward slashes --- nikola/plugins/task/galleries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nikola/plugins/task/galleries.py b/nikola/plugins/task/galleries.py index 9e7b53c4ce..1bbdbf6863 100644 --- a/nikola/plugins/task/galleries.py +++ b/nikola/plugins/task/galleries.py @@ -740,7 +740,7 @@ def make_url(url): def forward_slashes(path): """Given a path, convert directory separators to forward slash, on all platforms.""" - return str(pathlib.PurePosixPath(*os.path.split(path))) + return str(pathlib.PurePosixPath(*path.split(os.path.sep))) items = [] for img, srcimg, title in list(zip(dest_img_list, img_list, img_titles))[:self.kw["feed_length"]]: