When initializing a directory special remote with a relative path, the path is made absolute.
Using a relative path would work, until the user changed to some other directory in the repo and tried to access the remote from there..
This commit is contained in:
parent
b9b5ba7edb
commit
a0f6dab8de
2 changed files with 6 additions and 3 deletions
|
@ -68,13 +68,14 @@ directorySetup u c = do
|
||||||
-- verify configuration is sane
|
-- verify configuration is sane
|
||||||
let dir = fromMaybe (error "Specify directory=") $
|
let dir = fromMaybe (error "Specify directory=") $
|
||||||
M.lookup "directory" c
|
M.lookup "directory" c
|
||||||
liftIO $ unlessM (doesDirectoryExist dir) $
|
absdir <- liftIO $ absPath dir
|
||||||
error $ "Directory does not exist: " ++ dir
|
liftIO $ unlessM (doesDirectoryExist absdir) $
|
||||||
|
error $ "Directory does not exist: " ++ absdir
|
||||||
c' <- encryptionSetup c
|
c' <- encryptionSetup c
|
||||||
|
|
||||||
-- The directory is stored in git config, not in this remote's
|
-- The directory is stored in git config, not in this remote's
|
||||||
-- persistant state, so it can vary between hosts.
|
-- persistant state, so it can vary between hosts.
|
||||||
gitConfigSpecialRemote u c' "directory" dir
|
gitConfigSpecialRemote u c' "directory" absdir
|
||||||
return $ M.delete "directory" c'
|
return $ M.delete "directory" c'
|
||||||
|
|
||||||
{- Locations to try to access a given Key in the Directory.
|
{- Locations to try to access a given Key in the Directory.
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -10,6 +10,8 @@ git-annex (4.20130502) UNRELEASED; urgency=low
|
||||||
* Avoid depending on regex-tdfa on mips, mipsel, and s390, where it fails
|
* Avoid depending on regex-tdfa on mips, mipsel, and s390, where it fails
|
||||||
to build.
|
to build.
|
||||||
* direct: Fix a bug that could cause some files to be left in indirect mode.
|
* direct: Fix a bug that could cause some files to be left in indirect mode.
|
||||||
|
* When initializing a directory special remote with a relative path,
|
||||||
|
the path is made absolute.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Thu, 02 May 2013 20:39:19 -0400
|
-- Joey Hess <joeyh@debian.org> Thu, 02 May 2013 20:39:19 -0400
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue