fix: complete issues #201-#206 remediation #208

Merged
TapTap merged 17 commits from feat/triage-complete into dev 2026-08-11 21:06:49 +02:00
3 changed files with 10 additions and 12 deletions
Showing only changes of commit a6ec201800 - Show all commits
+3 -5
View File
@@ -873,11 +873,9 @@ int receive_manifest(int fd, const Config* config, int* next_status) {
return -1;
}
}
if (manifest) {
fprintf(stderr, "Deleting files not in manifest...\n");
delete_extras(config->receive_root_directory, manifest);
array_list_delete(manifest);
}
fprintf(stderr, "Deleting files not in manifest...\n");
delete_extras(config->receive_root_directory, manifest);
array_list_delete(manifest);
if (!receive_status(fd, next_status))
return -1;
return 0;
+5 -5
View File
@@ -138,11 +138,11 @@ static void test_to_disk_does_not_follow_symlink() {
FILE* fp = fopen(outside, "rb");
char buf[16] = {0};
EXPECT_NOT_NULL(fp);
if (fp) {
size_t read_count = fread(buf, 1, sizeof(buf) - 1, fp);
EXPECT_TRUE(read_count <= sizeof(buf) - 1);
fclose(fp);
}
if (!fp)
return;
size_t read_count = fread(buf, 1, sizeof(buf) - 1, fp);
EXPECT_TRUE(read_count <= sizeof(buf) - 1);
fclose(fp);
EXPECT_EQ_STR(buf, "outside");
unlink(outside);
unlink(link);
+2 -2
View File
@@ -91,8 +91,8 @@ static void test_sender_zero_capacity() {
cfg->send_directory = str_dup("/src");
cfg->receive_root_directory = str_dup("/dst");
Queue* q1 = queue_create(0, NULL);
Queue* q2 = queue_create(0, NULL);
Queue* const q1 = queue_create(0, NULL);
Queue* const q2 = queue_create(0, NULL);
EXPECT_NULL(q1);
EXPECT_NULL(q2);
config_delete(cfg);