last bug fixes and test2 & test3

This commit is contained in:
elvis
2022-05-03 23:14:39 +02:00
parent 3fb7c1e886
commit 4b7f15c555
13 changed files with 141 additions and 40 deletions

View File

@ -255,15 +255,15 @@ int openFile(const char* pathname, int flags) {
if(strncmp(res->ME, MEFP, sizeof(res->ME)) == 0) {
// some files were purged
if(openedFiles->print){
fprintf(openedFiles->out, "Il server ha espulso i seguenti file:\n");
fprintf(openedFiles->out, "\nIl server ha espulso i seguenti file:\n");
fflush(openedFiles->out);
for(int i=0;i<res->numfiles;++i) {
fprintf(openedFiles->out, "%d) %s\n", i, res->rf[i].path);
fprintf(openedFiles->out, "\t%d) %s\n", i+1, res->rf[i].path);
}
}
if(openedFiles->wDir) {
if(openedFiles->print) {
fprintf(openedFiles->out, "I file espulsi sono stati scritti nella cartella: %s\n", openedFiles->wDir);
fprintf(openedFiles->out, "\tI file espulsi sono stati scritti nella cartella: %s\n", openedFiles->wDir);
fflush(openedFiles->out);
}
if(storeFilesInDirectory(openedFiles->wDir, res->numfiles, res->rf) == -1) {
@ -275,7 +275,7 @@ int openFile(const char* pathname, int flags) {
}
} else {
if(openedFiles->print) {
fprintf(openedFiles->out, "I file espulsi non sono stati memorizzati su disco\n");
fprintf(openedFiles->out, "\tI file espulsi non sono stati memorizzati su disco\n");
fflush(openedFiles->out);
}
}