Skip to content

Commit

Permalink
Revert "look for Book dir"
Browse files Browse the repository at this point in the history
This reverts commit a6e69cd.
  • Loading branch information
VictorTaelin committed Oct 1, 2024
1 parent a6e69cd commit 0df2cc2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Kind/API.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ import Debug.Trace
-- Finds the directory named "book" or "monobook"
findBookDir :: FilePath -> IO (Maybe FilePath)
findBookDir dir = do
let bookDir = dir </> "Book"
let bookDir = dir </> "book"
let monoBookDir = dir </> "monobook"
isBook <- doesDirectoryExist bookDir
isMonoBook <- doesDirectoryExist monoBookDir
if isBook
then return $ Just bookDir
else if takeDirectory dir == dir
then return Nothing
else findBookDir (takeDirectory dir)
else if isMonoBook
then return $ Just monoBookDir
else if takeDirectory dir == dir
then return Nothing
else findBookDir (takeDirectory dir)

-- Extracts the definition name from a file path or name
extractName :: FilePath -> String -> String
Expand Down

0 comments on commit 0df2cc2

Please sign in to comment.