Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
.minimum_zig_version = "0.16.0",
.dependencies = .{
.zio = .{
.url = "git+https://github.com/lalinsky/zio?ref=v0.11.0#53abdf9ce5e6279e29703a39180ce1cedd8ac4ca",
.hash = "zio-0.11.0-xHbVVEqQGwDz0MYoQ0j7Ke0Y9E_iZVe5eLAWK4gd9U0i",
.url = "git+https://github.com/lalinsky/zio#49218cd2de6b0987e13d61d3471ba3909e213333",
.hash = "zio-0.13.0-xHbVVJMrHQA3985UtC43b4fQaZtcw_jCWByOTYuaV9wl",
},
.polyrole = .{
.url = "git+https://github.com/sdzx-1/polyrole.git#5c4f7cb527dc8d4098fd769a611678a79447546b",
Expand Down
28 changes: 8 additions & 20 deletions src/zs3.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1377,16 +1377,10 @@ pub fn handleAbortMultipart(io: Io, data_dir: []const u8, allocator: Allocator,
const parts_dir = allocPrint(allocator, "{s}/.uploads/{s}", .{ data_dir, upload_id });
defer allocator.free(parts_dir);

Io.Dir.cwd().deleteTree(io, parts_dir) catch |err| switch (err) {
error.AccessDenied => {
//TODO: fix this in macos
//An AccessDined error occurs on macOS, and the reason for this is currently unclear.
},
else => {
const error_resp = allocPrint(allocator, "AbortMultipartCleanupFailed: {t}", .{err});
sendError(res, 500, error_resp, "");
return err;
},
Io.Dir.cwd().deleteTree(io, parts_dir) catch |err| {
const error_resp = allocPrint(allocator, "AbortMultipartCleanupFailed: {t}", .{err});
sendError(res, 500, error_resp, "");
return err;
};

res.noContent();
Expand Down Expand Up @@ -1589,16 +1583,10 @@ pub fn handleCompleteMultipart(io: Io, data_dir: []const u8, allocator: Allocato
// Close final file before stat + meta write
final_file.close(io);

Io.Dir.cwd().deleteTree(io, parts_dir) catch |err| switch (err) {
error.AccessDenied => {
//TODO: fix this in macos
//An AccessDined error occurs on macOS, and the reason for this is currently unclear.
},
else => {
const error_resp = allocPrint(allocator, "FailedToCleanupUploadDir: {t}", .{err});
sendError(res, 500, error_resp, "");
return err;
},
Io.Dir.cwd().deleteTree(io, parts_dir) catch |err| {
const error_resp = allocPrint(allocator, "FailedToCleanupUploadDir: {t}", .{err});
sendError(res, 500, error_resp, "");
return err;
};

var final_hash: [16]u8 = undefined;
Expand Down
Loading