Ticket #221 (new enhancement)
"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
| Id | Summary | Milestone |
|---|---|---|
| #221 | └ "Dangling pointer" on erasing files with multiple hard links | Eraser 6.1/6.2 |
Blocked by
| Id | Summary | Milestone |
|---|---|---|
| #221 | └ "Dangling pointer" on erasing files with multiple hard links | Eraser 6.1/6.2 |
| #277 | └ Eraser Unified File Manager | Eraser 6.1/6.2 |
Attachments
Change History
Changed 4 years ago by fedsaren
- Attachment Before Erase.png added
comment:1 Changed 4 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 4 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 3 years ago by Joel
- Priority changed from major to blocker
- Type changed from defect to enhancement
comment:5 Changed 3 years ago by Joel
Looks like I'll need to use http://msdn.microsoft.com/en-us/library/aa364421%28v=VS.85%29.aspx
comment:6 Changed 3 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.

Before Erase