Skip to content

Commit

Permalink
free both dataFork and resourceFork when deleting file
Browse files Browse the repository at this point in the history
  • Loading branch information
xerub committed Jun 21, 2015
1 parent 671fbd1 commit 5efc1e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hfs/catalog.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,9 @@ int removeFile(const char* fileName, Volume* volume) {
io = openRawFile(((HFSPlusCatalogFile*)record)->fileID, &((HFSPlusCatalogFile*)record)->dataFork, record, volume);
allocate((RawFile*)io->data, 0);
CLOSE(io);
io = openRawFile(((HFSPlusCatalogFile*)record)->fileID, &((HFSPlusCatalogFile*)record)->resourceFork, record, volume);
allocate((RawFile*)io->data, 0);
CLOSE(io);

removeFromBTree(volume->catalogTree, (BTKey*)(&key));
XAttrList* next;
Expand Down

0 comments on commit 5efc1e1

Please sign in to comment.