coolaj86/dropshare — Issue #9: Deleting a file that is referred to by multiple IDs should not delete it from the fs
Author: jergason
Created: 2011-11-11 19:43:03+00:00
State: open

Right now if an ID is deleted, and other IDs refer to the same file, those other IDs will be broken.

This could be fixed by storing a list of IDs keyed by SHA1 hashes of files on the FS. Whenever an ID is deleted, check the list of IDs for the file it refers to. Only delete the file from the FS if the list of IDs only contains the ID that was deleted. Otherwise just remove that ID from the list.