( rootDir: string, filePath: string, )
| 62 | } |
| 63 | |
| 64 | function resolveDownloadFilePath( |
| 65 | rootDir: string, |
| 66 | filePath: string, |
| 67 | ): string | null { |
| 68 | const resolvedPath = path.isAbsolute(filePath) |
| 69 | ? path.resolve(filePath) |
| 70 | : path.resolve(rootDir, filePath); |
| 71 | |
| 72 | return isWithinDirectory(rootDir, resolvedPath) ? resolvedPath : null; |
| 73 | } |
| 74 | |
| 75 | // --------------------------------------------------------------------------- |
| 76 | // WebAdapter |
no test coverage detected