Ticket #221 (new enhancement)

Opened 5 years ago

Last modified 4 years ago

"Dangling pointer" on erasing files with multiple hard links

Reported by: fedsaren Owned by:
Priority: blocker Milestone: Eraser 6.1/6.2
Component: Core Version: 5.8.7
Keywords: NTFS hard link Cc:
Processor Architecture: Blocked By: #277
Blocking: Operating System:

Description

On an NTFS partition, when I erase a file with multiple hard links, the other hard link references are not deleted.

In my example (attached), I have first created a file with paths "D:\Testing\File1.txt" and "D:\Testing\File2.txt" and typed something into the file.
Then, I erase "D:\Testing\File2.txt" with Eraser.
After that, "D:\Testing\File1.txt" still exists and contains some data probably linked to another existing or deleted file.

This might lead to data loss if the non-deleted file path is erased or overwritten by user if it is linked to another existing file.

I suggest to ask user to choose to delete all the hard links OR cancel the erasure if multiple hard links are present.
Deleting all the hard links might only be feasible in Windows Vista or above as there is no API for getting all the hard links for older Windows, while cancelling erasure is possible for older Windows as the hard link count could still be get.

Blocking

IdSummaryMilestone
#221"Dangling pointer" on erasing files with multiple hard linksEraser 6.1/6.2

Blocked by

IdSummaryMilestone
#221"Dangling pointer" on erasing files with multiple hard linksEraser 6.1/6.2
#277Eraser Unified File ManagerEraser 6.1/6.2

Attachments

Before Erase.png (101.0 KB) - added by fedsaren 5 years ago.
Before Erase
After Erase.png (38.7 KB) - added by fedsaren 5 years ago.
After Erase
09.png (850 bytes) - added by trac. 8 months ago.
seo consultants

Change History

Changed 5 years ago by fedsaren

Before Erase

Changed 5 years ago by fedsaren

After Erase

comment:1 Changed 5 years ago by Joel

  • Milestone set to Eraser 6.1/6.2

I know what you mean and if you check the Eraser 6 documentation (see r1189) under the section "Behaviour toward reparse points" it is explicitly documented. Perhaps in future we may have a notification for this, but we need to design an appropriate UI to show this feedback to the user. Perhaps this will make it for 6.2 but I think 6.0 is too feature-complete to have more.

comment:2 Changed 5 years ago by Joel

I suggest to ask user to choose to delete all the hard links OR cancel the erasure if multiple hard links are present. 

That may be possible, but what happens when the user is running a scheduled task?

comment:3 Changed 5 years ago by Joel

  • Priority changed from major to blocker
  • Type changed from defect to enhancement

comment:4 Changed 5 years ago by Joel

  • Blocked By 277 added

comment:6 Changed 4 years ago by Joel

And also http://msdn.microsoft.com/en-us/library/aa364570%28v=VS.85%29.aspx on pre-Vista platforms; but this would be an expensive search.

Changed 8 months ago by trac.

Note: See TracTickets for help on using tickets.