Final additions for submission

This commit is contained in:
TriantaTV 2022-11-13 17:45:17 -06:00
parent 4d155bc61a
commit 3000681f02
2 changed files with 27 additions and 1 deletions

26
README.md Normal file
View File

@ -0,0 +1,26 @@
#Stuffy
Made by: Gregory Crawford (gcrawfo@siue.edu)
#Compiling:
Open root folder where `Makefile` is located.
Type `make` and the program should compile to the `./bin` folder
#Usage:
bin/stuffy.out [-a | -l | -r | -e] [Archive Name] [Filename] > [Out Location]
#Arguments:
[-a] -- Enter a specific number of producers
Ex: `bin/stuffy.out -a test/files/newstuffyarchive.test test/files/temp.test`
[-l] -- List contents of [Archive Name] by `Name: [Filename] | Size: [Size]`
Ex: `bin/stuffy.out -l test/files/newstuffyarchive.test
[-r] -- Remove [Filename] from [Archive Name]
Ex: `bin/stuffy.out -r test/files/newstuffyarchive.test test/files/temp4.test`
[-e] -- Extract [Filename] data to stdout from [Archive Name]
Ex: `bin/stuffy.out -e test/files/newstuffyarchive.test test/files/temp3.test > test/files/output.test`
#Testing:
A few functions are built in for testing
Try running `make test` | 8/8 Tests should pass

View File

@ -145,7 +145,7 @@ int IsFileArchived(char* archiveName, char* filename)
{
readSize = ReadSingleModuleFromArchive(archiveFD, &(module));
free(module.moduleData);
if (strcmp(module.moduleHeader.moduleName, filename) == 0)
if (strcmp(module.moduleHeader.moduleName, newFilename) == 0)
{
free(newFilename);
close(archiveFD);