Windows: Fixed permissions problem that prevented removing files from directory special remote.

Directory special remotes now fully usable.
This commit is contained in:
Joey Hess 2013-08-04 13:39:31 -04:00
parent 06db8e0bd9
commit 38022f4f49
4 changed files with 8 additions and 4 deletions

View file

@ -231,6 +231,11 @@ retrieveCheap _ _ _ _ = return False
remove :: FilePath -> Key -> Annex Bool
remove d k = liftIO $ do
void $ tryIO $ allowWrite dir
#ifdef mingw32_HOST_OS
{- Windows needs the files inside the directory to be writable
- before it can delete them. -}
void $ tryIO $ mapM_ allowWrite =<< dirContents dir
#endif
catchBoolIO $ do
removeDirectoryRecursive dir
return True

View file

@ -802,13 +802,10 @@ test_directory_remote env = "git-annex directory remote" ~: intmpclonerepo env $
annexed_present annexedfile
git_annex env "drop" [annexedfile, "--numcopies=2"] @? "drop failed"
annexed_notpresent annexedfile
#ifndef mingw32_HOST_OS
-- moving from directory special remote fails on Windows TODO
git_annex env "move" [annexedfile, "--from", "foo"] @? "move --from directory remote failed"
annexed_present annexedfile
not <$> git_annex env "drop" [annexedfile, "--numcopies=2"] @? "drop failed to fail"
annexed_present annexedfile
#endif
test_rsync_remote :: TestEnv -> Test
test_rsync_remote env = "git-annex rsync remote" ~: intmpclonerepo env $ do

2
debian/changelog vendored
View file

@ -7,6 +7,8 @@ git-annex (4.20130803) UNRELEASED; urgency=low
when a feed has repeatedly had a problems for at least 1 day.
* importfeed: Fix handling of dots in extensions.
* Windows: Added support for encrypted special remotes.
* Windows: Fixed permissions problem that prevented removing files
from directory special remote. Directory special remotes now fully usable.
-- Joey Hess <joeyh@debian.org> Fri, 02 Aug 2013 19:26:20 -0400

View file

@ -7,7 +7,7 @@ now! --[[Joey]]
support use of DOS style paths, which git-annex uses on Windows).
Must use the upstream build of git for Windows.
* Test suite works and passes, but 6 tests are disabled due to failing.
* Directory and rsync special remotes are known buggy.
* rsync special remotes are known buggy.
* Bad file locking, it's probably not safe to run more than one git-annex
process at the same time on Windows.
* No support for the assistant or webapp.