more OsPath conversion (542/749)

Sponsored-by: Luke T. Shumaker
This commit is contained in:
Joey Hess 2025-02-06 11:38:14 -04:00
parent 0d2b805806
commit 0811531b59
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
13 changed files with 127 additions and 116 deletions

View file

@ -24,8 +24,6 @@ import Logs.View
import Types.AdjustedBranch
import Annex.AdjustedBranch.Name
import qualified System.FilePath.ByteString as P
cmd :: Command
cmd = notBareRepo $
command "view" SectionMetaData "enter a view branch"
@ -120,13 +118,12 @@ checkoutViewBranch view madj mkbranch = do
forM_ l (removeemptydir top)
liftIO $ void cleanup
unlessM (liftIO $ doesDirectoryExist here) $ do
showLongNote $ UnquotedString $ cwdmissing (fromRawFilePath top)
showLongNote $ UnquotedString $ cwdmissing (fromOsPath top)
return ok
where
removeemptydir top d = do
p <- inRepo $ toTopFilePath d
liftIO $ tryIO $ removeDirectory $
fromRawFilePath $ (top P.</> getTopFilePath p)
liftIO $ tryIO $ removeDirectory $ top </> getTopFilePath p
cwdmissing top = unlines
[ "This view does not include the subdirectory you are currently in."
, "Perhaps you should: cd " ++ top