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);
|
||||
return;
|
||||
}
|
||||
int archiveFD = OpenArchive(archiveName, O_RDWR | O_CREAT);
|
||||
do
|
||||
{
|
||||
readSize = ReadSingleModuleFromArchive(archiveFD, &(module));
|
||||
free(module.moduleData);
|
||||
} while (readSize > 0);
|
||||
int archiveFD = OpenArchive(archiveName, O_WRONLY | O_APPEND| O_CREAT);
|
||||
LoadModuleFromFile(filename, &module);
|
||||
strcpy(module.moduleHeader.moduleName, filenameCleaned);
|
||||
WriteSingleModuleToArchive(archiveFD, &module);
|
||||
@ -302,4 +297,4 @@ void ExtractArchive(int argc, char* argv[])
|
||||
int writeSize;
|
||||
writeSize = _ExtractArchive(argv[2], argv[3]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user