← Commit list

afc01cd48

Glenn L McGrath
Glenn L McGrath
2003-04-21
FAILED Duration: 108s

Subject

unlink a previous file before its extracted

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

archival/libunarchive/data_extract_all.c+2 -1
@@ -53,7 +53,8 @@ extern void data_extract_all(archive_handle_t *archive_handle)
#endif
{
/* Regular file */
- dst_fd = bb_xopen(file_header->name, O_WRONLY | O_CREAT);
+ unlink(file_header->name);
+ dst_fd = bb_xopen(file_header->name, O_WRONLY | O_CREAT | O_EXCL);
archive_copy_file(archive_handle, dst_fd);
close(dst_fd);
}