Skip to content

Commit ea4e69a

Browse files
committed
chores: fix incorrect file open mode in pardo client
1 parent 14ca7bd commit ea4e69a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/pardo/pm/management.hoshi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ impl ProjectLocalPackageManager {
452452
rel_path = filename
453453
}
454454

455-
let f_res = fs.open(entry_str, "r")
455+
let f_res = fs.open(entry_str, "rb")
456456
if (f_res.is_ok()) {
457457
let f = f_res.unwrap()
458458
let data = f.read(f.size())
@@ -464,7 +464,7 @@ impl ProjectLocalPackageManager {
464464
z_entry.write(data.data)
465465
z_entry.close()
466466
} else {
467-
console.print(str.format("Warning: Failed to add {} to zip: {}\n", rel_path, entry_res.unwrap_err()))
467+
console.print(str.format("Warning: Failed to add {} to archive: {}\n", rel_path, entry_res.unwrap_err()))
468468
}
469469
}
470470
}

src/pardo/pm/registry.hoshi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ impl PardoRegistryRemote {
271271
// 5. Upload artifact
272272
console.print("Uploading artifact ", zip_name, " for ", platform, "/", arch, "...\n")
273273

274-
let [f, f_err] = fs.open(zip_path.to_string(), "r")
274+
let [f, f_err] = fs.open(zip_path.to_string(), "rb")
275275
if (f_err != null) { return lang.Result<bool, str.Str>.err("Failed to open artifact: " + f_err as str.Str) }
276276

277277
let form = http.FormData(vec.Vec<http.FormDataField>())

0 commit comments

Comments
 (0)