Always try to thaw content, even when annex.crippledfilesystem is set.

This commit is contained in:
Joey Hess 2016-03-09 13:33:13 -04:00
parent d201e6c359
commit 9039bdb4ea
Failed to extract signature
5 changed files with 30 additions and 4 deletions

View file

@ -951,8 +951,13 @@ chmodContent file = unlessM crippledFileSystem $
{- Allows writing to an annexed file that freezeContent was called on
- before. -}
thawContent :: FilePath -> Annex ()
thawContent file = unlessM crippledFileSystem $
withShared go
thawContent file = ifM crippledFileSystem
-- Probably cannot change mode on crippled filesystem,
-- but if file modes are supported, the content may be frozen
-- so try to thaw it.
( void $ tryNonAsync $ withShared go
, withShared go
)
where
go GroupShared = liftIO $ groupWriteRead file
go AllShared = liftIO $ groupWriteRead file

View file

@ -92,8 +92,15 @@ freezeContentDir file = unlessM crippledFileSystem $
go _ = liftIO $ preventWrite dir
thawContentDir :: FilePath -> Annex ()
thawContentDir file = unlessM crippledFileSystem $
liftIO $ allowWrite $ parentDir file
thawContentDir file = ifM crippledFileSystem
-- Probably cannot change mode on crippled filesystem,
-- but if file modes are supported, the directory may be frozen,
-- so try to thaw it.
( void $ tryNonAsync go
, go
)
where
go = liftIO $ allowWrite $ parentDir file
{- Makes the directory tree to store an annexed file's content,
- with appropriate permissions on each level. -}

1
debian/changelog vendored
View file

@ -11,6 +11,7 @@ git-annex (6.20160230) UNRELEASED; urgency=medium
* dropkey: Add --batch and --json.
* Fix OSX dmg to include libraries needed by bundled gpg,
lost in last release.
* Always try to thaw content, even when annex.crippledfilesystem is set.
-- Joey Hess <id@joeyh.name> Mon, 29 Feb 2016 13:00:30 -0400

View file

@ -103,3 +103,5 @@ Could the problem have something to do with the file having permission 0444 and
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
Been using it since your kickstarter campaign!
> [[done]] --[[Joey]]

View file

@ -0,0 +1,11 @@
[[!comment format=mdwn
username="joey"
subject="""comment 6"""
date="2016-03-09T17:31:18Z"
content="""
Ok, I managed to get a vfat that honors file perms with those mount
options.
I'm going to make git-annex always try to chmod the file, even if it's on a
crippled filesystem. That should solve it.
"""]]