Merge remote-tracking branch 'refs/remotes/TheOfficialFloW/master'

This commit is contained in:
littlebalup 2016-09-14 14:37:07 +02:00
commit 18017cc553
2 changed files with 12 additions and 1 deletions

11
file.c
View File

@ -758,6 +758,11 @@ int fileListRemoveEntry(FileList *list, FileListEntry *entry) {
list->length--;
free(entry);
if (list->length == 0) {
list->head = NULL;
list->tail = NULL;
}
return 1;
}
@ -783,9 +788,13 @@ int fileListRemoveEntryByName(FileList *list, char *name) {
}
list->length--;
free(entry);
if (list->length == 0) {
list->head = NULL;
list->tail = NULL;
}
return 1;
}

2
main.c
View File

@ -224,6 +224,7 @@ void refreshMarkList() {
// Check if the entry still exits. If not, remove it from list
SceIoStat stat;
memset(&stat, 0, sizeof(SceIoStat));
if (sceIoGetstat(path, &stat) < 0)
fileListRemoveEntry(&mark_list, entry);
@ -247,6 +248,7 @@ void refreshCopyList() {
// Check if the entry still exits. If not, remove it from list
SceIoStat stat;
memset(&stat, 0, sizeof(SceIoStat));
int res = sceIoGetstat(path, &stat);
if (res < 0 && res != 0x80010014)
fileListRemoveEntry(&copy_list, entry);