remove unused isSymLink
That made Utility.FileMode depend on unix, but Utility.Tmp now depends on it, and is used by Setup, which does not. So it was easiest to remove this, especially since it's not used.
This commit is contained in:
parent
376de6fcce
commit
820d4368b3
1 changed files with 2 additions and 14 deletions
|
@ -1,6 +1,6 @@
|
|||
{- File mode utilities.
|
||||
-
|
||||
- Copyright 2010-2017 Joey Hess <id@joeyh.name>
|
||||
- Copyright 2010-2020 Joey Hess <id@joeyh.name>
|
||||
-
|
||||
- License: BSD-2-clause
|
||||
-}
|
||||
|
@ -16,11 +16,7 @@ import System.IO
|
|||
import Control.Monad
|
||||
import System.PosixCompat.Types
|
||||
import System.PosixCompat.Files
|
||||
#ifndef mingw32_HOST_OS
|
||||
import System.Posix.Files (symbolicLinkMode)
|
||||
import Control.Monad.IO.Class (liftIO)
|
||||
#endif
|
||||
import Control.Monad.IO.Class (MonadIO)
|
||||
import Control.Monad.IO.Class
|
||||
import Foreign (complement)
|
||||
import Control.Monad.Catch
|
||||
|
||||
|
@ -97,14 +93,6 @@ groupWriteRead f = modifyFileMode f $ addModes groupSharedModes
|
|||
checkMode :: FileMode -> FileMode -> Bool
|
||||
checkMode checkfor mode = checkfor `intersectFileModes` mode == checkfor
|
||||
|
||||
{- Checks if a file mode indicates it's a symlink. -}
|
||||
isSymLink :: FileMode -> Bool
|
||||
#ifdef mingw32_HOST_OS
|
||||
isSymLink _ = False
|
||||
#else
|
||||
isSymLink = checkMode symbolicLinkMode
|
||||
#endif
|
||||
|
||||
{- Checks if a file has any executable bits set. -}
|
||||
isExecutable :: FileMode -> Bool
|
||||
isExecutable mode = combineModes executeModes `intersectFileModes` mode /= 0
|
||||
|
|
Loading…
Reference in a new issue