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"]]: