mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: use OS-independent abs. path check (#8505)
This commit is contained in:
parent
8dbb4f3153
commit
bfd4e68f25
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user