Changed to append on adding
This commit is contained in:
parent
36c4d61c9f
commit
4d155bc61a
@ -176,12 +176,7 @@ void AddToArchive(char* archiveName, char* filename)
|
|||||||
fprintf(stderr, "%s not found.\n", filename);
|
fprintf(stderr, "%s not found.\n", filename);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int archiveFD = OpenArchive(archiveName, O_RDWR | O_CREAT);
|
int archiveFD = OpenArchive(archiveName, O_WRONLY | O_APPEND| O_CREAT);
|
||||||
do
|
|
||||||
{
|
|
||||||
readSize = ReadSingleModuleFromArchive(archiveFD, &(module));
|
|
||||||
free(module.moduleData);
|
|
||||||
} while (readSize > 0);
|
|
||||||
LoadModuleFromFile(filename, &module);
|
LoadModuleFromFile(filename, &module);
|
||||||
strcpy(module.moduleHeader.moduleName, filenameCleaned);
|
strcpy(module.moduleHeader.moduleName, filenameCleaned);
|
||||||
WriteSingleModuleToArchive(archiveFD, &module);
|
WriteSingleModuleToArchive(archiveFD, &module);
|
||||||
|
Loading…
Reference in New Issue
Block a user