File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -83,16 +83,21 @@ pub fn update_self(alloc: Allocator, cp: CommonPaths) !void {
8383 while (m_iter .next ()) | i | {
8484 var entry = i .value_ptr .* ;
8585 if (entry .is_dir ) continue ;
86-
8786 const filename = std .fs .path .basename (i .key_ptr .* );
87+ bin_dir .deleteFile (filename ) catch | e | {
88+ if (e != error .FileNotFound ) return e ;
89+ };
8890 const file = try bin_dir .createFile (filename , .{ .truncate = true , .lock = .shared });
8991 var file_writer = file .writer (& buf );
9092 const intf = & file_writer .interface ;
9193 defer file .close ();
9294
9395 try entry .decompressWriter (intf );
96+ try file .chmod (0o755 );
9497 }
95- std .debug .print ("zigverm updated successfully" , .{});
98+ std .debug .print ("zigverm updated successfully\n " , .{});
99+ defer download_tarball .deinit () catch {};
100+ try cp .download_dir .deleteFile (full_dl_filename );
96101}
97102
98103fn read_github_releases_data (alloc : Allocator , client : * Client ) ! json. Parsed (json .Value ) {
You can’t perform that action at this time.
0 commit comments