mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-29 15:57:00 +02:00
fix: Update path.join -> safeJoinPath for compression utils (#20461)
This commit is contained in:
parent
e67fac66f7
commit
ad11e77b42
|
|
@ -2,6 +2,7 @@ import * as fflate from 'fflate';
|
|||
import { readFile, readdir, writeFile, mkdir } from 'fs/promises';
|
||||
import * as path from 'path';
|
||||
import { createWriteStream, createReadStream } from 'fs';
|
||||
import { safeJoinPath } from '@n8n/backend-common';
|
||||
|
||||
// Reuse the same compression levels as the Compression node
|
||||
const ALREADY_COMPRESSED = [
|
||||
|
|
@ -221,7 +222,7 @@ async function addDirectoryToZipStreaming(
|
|||
continue;
|
||||
}
|
||||
|
||||
const fullPath = path.join(dirPath, entry.name);
|
||||
const fullPath = safeJoinPath(dirPath, entry.name);
|
||||
const zipEntryPath = zipPath ? `${zipPath}/${entry.name}` : entry.name;
|
||||
|
||||
if (entry.isDirectory()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user