Skip to content

Commit

Permalink
hotfix for bug that would replace resident entries instead of deleted…
Browse files Browse the repository at this point in the history
… entries
  • Loading branch information
ecpre committed Mar 3, 2023
1 parent fad2e15 commit 49ac489
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FuseRedSea.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ unsigned long long int find_free_dir_entry(struct redsea_directory* directory) {
for (int i = 0; i < directory->num_children; i++) {
uint16_t filetype;
fread(&filetype, 2, 1, image);
if ((filetype >> 9) & 1 == 1) { // if file is deleted it is free
if ((filetype >> 8) & 1 == 1) { // if file is deleted it is free
fseek(image, -2, SEEK_CUR);
break;
}
Expand Down

0 comments on commit 49ac489

Please sign in to comment.