Navigation Menu

Skip to content

Commit

Permalink
fix: use OS-independent abs. path check (#8505)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrandolf committed Jun 10, 2022
1 parent 8dbb4f3 commit bfd4e68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/JSHandle.ts
Expand Up @@ -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);
Expand Down

0 comments on commit bfd4e68

Please sign in to comment.