diff options
-rw-r--r-- | Locations.hs | 3 | ||||
-rw-r--r-- | Test.hs | 3 | ||||
-rw-r--r-- | Utility/Path.hs | 2 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | doc/bugs/git_annex_drop_direct_creates_symlinks_with_possibly_incorrect_path_separator.mdwn | 3 |
5 files changed, 11 insertions, 2 deletions
diff --git a/Locations.hs b/Locations.hs index bf313dbc8..02995ee4a 100644 --- a/Locations.hs +++ b/Locations.hs @@ -75,6 +75,7 @@ import Types.Key import Types.UUID import Types.Difference import qualified Git +import Git.FilePath import Annex.DirHashes {- Conventions: @@ -154,7 +155,7 @@ gitAnnexLink file key r config = do currdir <- getCurrentDirectory let absfile = fromMaybe whoops $ absNormPathUnix currdir file loc <- gitAnnexLocation' key r config False - relPathDirToFile (parentDir absfile) loc + toInternalGitPath <$> relPathDirToFile (parentDir absfile) loc where whoops = error $ "unable to normalize " ++ file @@ -330,6 +330,9 @@ test_drop_withremote = intmpclonerepo $ do git_annex "numcopies" ["1"] @? "numcopies config failed" git_annex "drop" [annexedfile] @? "drop failed though origin has copy" annexed_notpresent annexedfile + -- make sure that the correct symlink is staged for the file + -- after drop + git_annex_expectoutput "status" [] [] inmainrepo $ annexed_present annexedfile test_drop_untrustedremote :: Assertion diff --git a/Utility/Path.hs b/Utility/Path.hs index 4ff88f72e..6ecec2c5f 100644 --- a/Utility/Path.hs +++ b/Utility/Path.hs @@ -66,7 +66,7 @@ absPathFrom :: FilePath -> FilePath -> FilePath absPathFrom dir path = simplifyPath (combine dir path) {- On Windows, this converts the paths to unix-style, in order to run - - MissingH's absNormPath on them. Resulting path will use / separators. -} + - MissingH's absNormPath on them. -} absNormPathUnix :: FilePath -> FilePath -> Maybe FilePath #ifndef mingw32_HOST_OS absNormPathUnix dir path = MissingH.absNormPath dir path diff --git a/debian/changelog b/debian/changelog index 9ff4d2fe5..643f872bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ git-annex (5.20150206) UNRELEASED; urgency=medium can actually use them, instead of by all commands. * import: Avoid checksumming file twice when run in the default or --duplicate mode. + * Windows: Fix bug in dropping an annexed file, which + caused a symlink to be staged that contained backslashes. -- Joey Hess <id@joeyh.name> Fri, 06 Feb 2015 13:57:08 -0400 diff --git a/doc/bugs/git_annex_drop_direct_creates_symlinks_with_possibly_incorrect_path_separator.mdwn b/doc/bugs/git_annex_drop_direct_creates_symlinks_with_possibly_incorrect_path_separator.mdwn index e79e0fa9e..e0c501c90 100644 --- a/doc/bugs/git_annex_drop_direct_creates_symlinks_with_possibly_incorrect_path_separator.mdwn +++ b/doc/bugs/git_annex_drop_direct_creates_symlinks_with_possibly_incorrect_path_separator.mdwn @@ -32,3 +32,6 @@ changing the path separator seemingly solves: ### Please provide any additional information below. no additional info. + +> I see that I broke this some time ago. Fixed it now, and added a test +> case. [[done]] --[[Joey]] |