Skip to content

Commit 004f7f4

Browse files
committed
Correctly normalize to forward slash the path when creating tar.gz for Connect deploys
std/tar will create folders based on file paths used, but it requires using / and not \\ in path. This is a problem on Windows, where the path separator is \\. This commit normalize the path to use / instead of \\ when creating the tar.gz file for Connect deploys. (cherry picked from commit ffb7459)
1 parent 1f725dd commit 004f7f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/deno_ral/tar.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import { TarStream, type TarStreamInput } from "tar/tar-stream";
1010
import { join } from "../deno_ral/path.ts";
11+
import { pathWithForwardSlashes } from "../core/path.ts";
1112

1213
/**
1314
* Creates a tar archive from the specified files and directories.
@@ -31,7 +32,7 @@ export async function createTarFromFiles(
3132
const stat = await Deno.stat(fullPath);
3233

3334
// Use original path for archive, full path for reading
34-
const archivePath = path;
35+
const archivePath = pathWithForwardSlashes(path);
3536

3637
if (stat.isDirectory) {
3738
// Handle directory

0 commit comments

Comments
 (0)