avoid using removePathForcibly everywhere, it is unsafe
authorJoey Hess <joeyh@joeyh.name>
Mon, 2 May 2022 18:06:20 +0000 (14:06 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 2 May 2022 18:06:20 +0000 (14:06 -0400)
commit642703c7e4d7b3d0f548f899d9d3d5927a422d56
tree308e3dabbba1fb94e6706a9b2fabec5d5143be4e
parent1b02cd471537e3387f1758ac4ad0818c7b0930d8
avoid using removePathForcibly everywhere, it is unsafe

If the temp directory can somehow contain a hard link, it changes the
mode, which affects all other hard linked files. So, it's too unsafe
to use everywhere in git-annex, since hard links are possible in
multiple ways and it would be very hard to prove that every place that
uses a temp directory cannot possibly put a hard link in it.

Added a call to removeDirectoryForCleanup to test_crypto, which will
fix the problem that commit 17b20a24502aee3bfc5683146c3899a233295aea
was intending to fix, with a much smaller hammer.

Sponsored-by: Dartmouth College's Datalad project
Test.hs
Utility/Tmp/Dir.hs
doc/bugs/Tests_v8_locked__58___rsync_remote__58___FAIL.mdwn
doc/bugs/Tests_v8_locked__58___rsync_remote__58___FAIL/comment_2_0327663314d2a8b2f0cab7536fdaa6bd._comment [new file with mode: 0644]