more OsPath conversion (602/749)
Sponsored-by: Brock Spratlen
This commit is contained in:
parent
2d1db7986c
commit
a5d48edd94
25 changed files with 227 additions and 187 deletions
|
@ -49,22 +49,22 @@ start = startingNoMessage (ActionItemOther Nothing) $ do
|
|||
trustmap <- trustMapLoad
|
||||
|
||||
file <- (</>)
|
||||
<$> fromRepo (fromRawFilePath . gitAnnexDir)
|
||||
<*> pure "map.dot"
|
||||
<$> fromRepo gitAnnexDir
|
||||
<*> pure (literalOsPath "map.dot")
|
||||
|
||||
liftIO $ writeFile file (drawMap rs trustmap umap)
|
||||
liftIO $ writeFile (fromOsPath file) (drawMap rs trustmap umap)
|
||||
next $
|
||||
ifM (Annex.getRead Annex.fast)
|
||||
( runViewer file []
|
||||
, runViewer file
|
||||
[ ("xdot", [File file])
|
||||
, ("dot", [Param "-Tx11", File file])
|
||||
[ ("xdot", [File (fromOsPath file)])
|
||||
, ("dot", [Param "-Tx11", File (fromOsPath file)])
|
||||
]
|
||||
)
|
||||
|
||||
runViewer :: FilePath -> [(String, [CommandParam])] -> Annex Bool
|
||||
runViewer :: OsPath -> [(String, [CommandParam])] -> Annex Bool
|
||||
runViewer file [] = do
|
||||
showLongNote $ UnquotedString $ "left map in " ++ file
|
||||
showLongNote $ UnquotedString $ "left map in " ++ fromOsPath file
|
||||
return True
|
||||
runViewer file ((c, ps):rest) = ifM (liftIO $ inSearchPath c)
|
||||
( do
|
||||
|
@ -244,7 +244,7 @@ tryScan r
|
|||
where
|
||||
remotecmd = "sh -c " ++ shellEscape
|
||||
(cddir ++ " && " ++ "git config --null --list")
|
||||
dir = fromRawFilePath $ Git.repoPath r
|
||||
dir = fromOsPath $ Git.repoPath r
|
||||
cddir
|
||||
| "/~" `isPrefixOf` dir =
|
||||
let (userhome, reldir) = span (/= '/') (drop 1 dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue