From bfd4e68f25bec6e00fd5cbf261813f8297d362ee Mon Sep 17 00:00:00 2001 From: jrandolf <101637635+jrandolf@users.noreply.github.com> Date: Fri, 10 Jun 2022 14:34:57 +0200 Subject: [PATCH] fix: use OS-independent abs. path check (#8505) --- src/common/JSHandle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/JSHandle.ts b/src/common/JSHandle.ts index 67a3c5d2e6611..0dcabd7837159 100644 --- a/src/common/JSHandle.ts +++ b/src/common/JSHandle.ts @@ -846,7 +846,7 @@ export class ElementHandle< throw error; } const files = filePaths.map((filePath) => { - if (path.isAbsolute(filePath)) { + if (path.win32.isAbsolute(filePath) || path.posix.isAbsolute(filePath)) { return filePath; } else { return path.resolve(filePath);