Skip to content

Commit 1dc9277

Browse files
committed
Fix Windows upload: normalize path separators in ZIP entries
Bump to v0.2.12
1 parent a0650e6 commit 1dc9277

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "openworkers-cli"
3-
version = "0.2.11"
3+
version = "0.2.12"
44
edition = "2024"
55
license = "MIT"
66
description = "CLI for OpenWorkers - Self-hosted Cloudflare Workers runtime"

src/backend/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ impl Backend for DbBackend {
430430
continue;
431431
}
432432

433-
let filename = file.name().to_string();
433+
let filename = file.name().replace('\\', "/");
434434

435435
// Normalize path (remove leading directory if present)
436436
let normalized = filename

src/commands/workers.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ fn create_zip_from_folder(folder: &PathBuf) -> Result<Vec<u8>, BackendError> {
384384
BackendError::Api(format!("Failed to read file '{}': {}", path.display(), e))
385385
})?;
386386

387-
zip.start_file(relative.to_string_lossy(), options)
387+
let relative_path = relative.to_string_lossy().replace('\\', "/");
388+
zip.start_file(relative_path, options)
388389
.map_err(|e| BackendError::Api(format!("Zip error: {}", e)))?;
389390

390391
zip.write_all(&content)

0 commit comments

Comments
 (0)