Skip to content

Commit dc2b7db

Browse files
author
Al Manning
committed
add pathWithForwardSlashes
1 parent 3575784 commit dc2b7db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/publish/confluence/confluence-helper.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
resolve,
1010
} from "path/mod.ts";
1111
import { isHttpUrl } from "../../core/url.ts";
12+
import { pathWithForwardSlashes } from "../../core/path.ts";
1213
import { AccountToken, InputMetadata } from "../provider.ts";
1314
import {
1415
ConfluenceParent,
@@ -624,7 +625,7 @@ export const findAttachments = (
624625
publishFiles: string[] = [],
625626
filePathParam: string = ""
626627
): string[] => {
627-
const filePath = filePathParam.replaceAll("\\", "/");
628+
const filePath = pathWithForwardSlashes(filePathParam);
628629

629630
const pathList = filePath.split("/");
630631
const parentPath = pathList.slice(0, pathList.length - 1).join("/");
@@ -635,7 +636,7 @@ export const findAttachments = (
635636
if (publishFiles.length > 0) {
636637
uniqueResult = uniqueResult.map((assetFileName: string) => {
637638
const assetInPublishFiles = publishFiles.find((assetPathParam) => {
638-
const assetPath = assetPathParam.replaceAll("\\", "/");
639+
const assetPath = pathWithForwardSlashes(assetPathParam);
639640

640641
const toCheck = join(parentPath, assetFileName);
641642

0 commit comments

Comments
 (0)