fix webapp reversion caused by relative path changes

webapp: When adding another local repository, and combining it with the
current repository, the new repository's remote path was set to "." rather
than the path to the current repository. This was a reversion caused by the
relative path changes in 5.20150113.
This commit is contained in:
Joey Hess 2015-04-09 14:59:08 -04:00
parent 148d5b2009
commit 2736c59204
3 changed files with 22 additions and 3 deletions

View file

@ -347,8 +347,9 @@ getFinishAddDriveR drive = go
combineRepos :: FilePath -> String -> Handler Remote
combineRepos dir name = liftAnnex $ do
hostname <- fromMaybe "host" <$> liftIO getHostname
hostlocation <- fromRepo Git.repoLocation
liftIO $ inDir dir $ void $ makeGitRemote hostname hostlocation
mylocation <- fromRepo Git.repoLocation
mypath <- liftIO $ relPathDirToFile dir mylocation
liftIO $ inDir dir $ void $ makeGitRemote hostname mypath
addRemote $ makeGitRemote name dir
getEnableDirectoryR :: UUID -> Handler Html