Updated patch

This commit is contained in:
asakurareiko@f3d908c71c009580228b264f63f21c7274df7476 2021-10-26 19:55:58 +00:00 committed by admin
parent d607446043
commit 10582d1fe3

View file

@ -1,7 +1,7 @@
``` ```
From d863d357d89e7e584755dd09c6af18eedefc9557 Mon Sep 17 00:00:00 2001 From 92dfde25409ae2268ab2251920ed11646c122870 Mon Sep 17 00:00:00 2001
From: Reiko Asakura <asakurareiko@protonmail.ch> From: Reiko Asakura <asakurareiko@protonmail.ch>
Date: Sun, 24 Oct 2021 14:44:44 -0400 Date: Tue, 26 Oct 2021 15:46:38 -0400
Subject: [PATCH] Call freezeContent after move into annex Subject: [PATCH] Call freezeContent after move into annex
This change better supports Windows ACL management using This change better supports Windows ACL management using
@ -16,21 +16,19 @@ moving into the annex, it will likely inherit a grant for the delete
permission which allows it to be deleted irrespective of the permissions permission which allows it to be deleted irrespective of the permissions
of the parent directory. of the parent directory.
--- ---
Annex/Content.hs | 2 +- Annex/Content.hs | 3 +++
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 3 insertions(+)
diff --git a/Annex/Content.hs b/Annex/Content.hs diff --git a/Annex/Content.hs b/Annex/Content.hs
index da65143ab..3664c6ea2 100644 index da65143ab..89c36e612 100644
--- a/Annex/Content.hs --- a/Annex/Content.hs
+++ b/Annex/Content.hs +++ b/Annex/Content.hs
@@ -342,10 +342,10 @@ moveAnnex key af src = ifM (checkSecureHashes' key) @@ -346,6 +346,9 @@ moveAnnex key af src = ifM (checkSecureHashes' key)
storeobject dest = ifM (liftIO $ R.doesPathExist dest)
( alreadyhave
, adjustedBranchRefresh af $ modifyContent dest $ do
- freezeContent src
liftIO $ moveFile liftIO $ moveFile
(fromRawFilePath src) (fromRawFilePath src)
(fromRawFilePath dest) (fromRawFilePath dest)
+ -- On Windows the delete permission must be denied only
+ -- after the content has been moved in the annex.
+ freezeContent dest + freezeContent dest
g <- Annex.gitRepo g <- Annex.gitRepo
fs <- map (`fromTopFilePath` g) fs <- map (`fromTopFilePath` g)