LIB/GTK: use more recent library versions
This commit is contained in:
parent
bb6c1b3cda
commit
0fca64594d
2
3rdparty/hinotify
vendored
2
3rdparty/hinotify
vendored
@ -1 +1 @@
|
||||
Subproject commit 19094dd59e76e163ec27f5eb5c02b2906dc72bc1
|
||||
Subproject commit 6751bf0cc84ac8792d9636ede047ce567ef28469
|
2
3rdparty/hpath
vendored
2
3rdparty/hpath
vendored
@ -1 +1 @@
|
||||
Subproject commit 577ecf67508839c485df10335583a625fcf88bc4
|
||||
Subproject commit f1875da78036225675c5783cf2053388f04cd837
|
2
3rdparty/simple-sendfile
vendored
2
3rdparty/simple-sendfile
vendored
@ -1 +1 @@
|
||||
Subproject commit 28f95d506969ffd0c67aabbe48b315b7ae26c604
|
||||
Subproject commit 869c69d3365b61831243989b81f26a2364f24f61
|
@ -40,13 +40,15 @@ library
|
||||
hpath,
|
||||
mtl >= 2.2,
|
||||
old-locale >= 1,
|
||||
posix-paths,
|
||||
process,
|
||||
safe,
|
||||
simple-sendfile,
|
||||
stm,
|
||||
time >= 1.4.2,
|
||||
unix,
|
||||
unix-bytestring
|
||||
unix-bytestring,
|
||||
utf8-string
|
||||
hs-source-dirs: src
|
||||
default-language: Haskell2010
|
||||
Default-Extensions: RecordWildCards
|
||||
@ -79,7 +81,6 @@ executable hsfm-gtk
|
||||
bytestring,
|
||||
containers,
|
||||
data-default,
|
||||
encoding,
|
||||
filepath >= 1.3.0.0,
|
||||
glib >= 0.13,
|
||||
gtk3 >= 0.14.1,
|
||||
@ -88,6 +89,7 @@ executable hsfm-gtk
|
||||
hsfm,
|
||||
mtl >= 2.2,
|
||||
old-locale >= 1,
|
||||
posix-paths,
|
||||
process,
|
||||
safe,
|
||||
simple-sendfile,
|
||||
@ -96,6 +98,7 @@ executable hsfm-gtk
|
||||
transformers,
|
||||
unix,
|
||||
unix-bytestring,
|
||||
utf8-string,
|
||||
word8
|
||||
hs-source-dirs: src
|
||||
default-language: Haskell2010
|
||||
|
@ -51,8 +51,9 @@ import System.IO.Error
|
||||
catchIOError
|
||||
)
|
||||
|
||||
import qualified System.Posix.Files.ByteString as PF
|
||||
import qualified System.Posix.Directory.ByteString as PFD
|
||||
import System.Posix.FilePath
|
||||
import qualified System.Posix.Files.ByteString as PF
|
||||
|
||||
|
||||
data FmIOException = FileDoesNotExist ByteString
|
||||
@ -146,7 +147,7 @@ throwSameFile fp1 fp2 = do
|
||||
(\_ -> fmap P.fromAbs
|
||||
$ (\x -> maybe x (\y -> x P.</> y) $ P.basename fp2)
|
||||
<$> (P.canonicalizePath $ P.dirname fp2))
|
||||
when (P.equalFilePath fp1' fp2') (throw $ SameFile fp1' fp2')
|
||||
when (equalFilePath fp1' fp2') (throw $ SameFile fp1' fp2')
|
||||
|
||||
|
||||
-- |Checks whether the destination directory is contained
|
||||
|
@ -82,11 +82,6 @@ import HSFM.FileSystem.Errors
|
||||
import HSFM.FileSystem.FileType
|
||||
import HSFM.Utils.IO
|
||||
import Prelude hiding (readFile)
|
||||
import Network.Sendfile
|
||||
(
|
||||
sendfileFd
|
||||
, FileRange(EntireFile)
|
||||
)
|
||||
import System.Posix.Directory.ByteString
|
||||
(
|
||||
createDirectory
|
||||
@ -114,6 +109,11 @@ import System.Posix.Files.ByteString
|
||||
import qualified System.Posix.Files.ByteString as PF
|
||||
import qualified "unix" System.Posix.IO.ByteString as SPI
|
||||
import qualified "unix-bytestring" System.Posix.IO.ByteString as SPB
|
||||
import System.Posix.IO.Sendfile.ByteString
|
||||
(
|
||||
sendfileFd
|
||||
, FileRange(EntireFile)
|
||||
)
|
||||
import qualified System.Posix.Process.ByteString as SPP
|
||||
import System.Posix.Types
|
||||
(
|
||||
@ -361,7 +361,7 @@ unsafeCopyFile cm from@RegFile{} to@Dir{} fn
|
||||
bracket (SPI.openFd dest SPI.WriteOnly (Just fileM)
|
||||
SPI.defaultFileFlags)
|
||||
SPI.closeFd
|
||||
$ \dfd -> sendfileFd dfd sfd EntireFile (return ())
|
||||
$ \dfd -> sendfileFd dfd sfd EntireFile
|
||||
-- low-level copy operation utilizing read(2)/write(2)
|
||||
-- in case `sendFileCopy` fails/is unsupported
|
||||
fallbackCopy source dest =
|
||||
|
@ -59,6 +59,7 @@ import System.IO.Error
|
||||
, isDoesNotExistErrorType
|
||||
)
|
||||
import qualified System.Posix.Directory.ByteString as PFD
|
||||
import System.Posix.Directory.Traversals (realpath)
|
||||
import qualified System.Posix.Files.ByteString as PF
|
||||
import System.Posix.Types
|
||||
(
|
||||
@ -310,7 +311,7 @@ readFile ff p =
|
||||
-- TODO: could it happen that too many '..' lead
|
||||
-- to something like '/' after normalization?
|
||||
let sfp = (P.fromAbs . P.dirname $ p') `P.combine` x
|
||||
rsfp <- P.realPath sfp
|
||||
rsfp <- realpath sfp
|
||||
readFile ff =<< P.parseAbs rsfp
|
||||
return $ SymLink p' fv resolvedSyml x
|
||||
| PF.isDirectory fs = return $ Dir p' fv
|
||||
|
@ -24,13 +24,9 @@ module HSFM.GUI.Glib.GlibString where
|
||||
|
||||
|
||||
import qualified Data.ByteString as BS
|
||||
import Data.Encoding
|
||||
import Data.ByteString.UTF8
|
||||
(
|
||||
decodeStrictByteString
|
||||
)
|
||||
import Data.Encoding.UTF8
|
||||
(
|
||||
UTF8(..)
|
||||
toString
|
||||
)
|
||||
import Data.Word8
|
||||
(
|
||||
@ -67,9 +63,9 @@ instance GlibString BS.ByteString where
|
||||
BS.packCStringLen (s, fromIntegral len)
|
||||
maybePeekUTFString = maybePeek peekUTFString
|
||||
peekUTFStringLen = BS.packCStringLen
|
||||
newUTFString = newUTFString . decodeStrictByteString UTF8
|
||||
newUTFStringLen = newUTFStringLen . decodeStrictByteString UTF8
|
||||
genUTFOfs = genUTFOfs . decodeStrictByteString UTF8
|
||||
newUTFString = newUTFString . toString
|
||||
newUTFStringLen = newUTFStringLen . toString
|
||||
genUTFOfs = genUTFOfs . toString
|
||||
stringLength = BS.length
|
||||
unPrintf s = BS.intercalate "%%" (BS.split _percent s)
|
||||
|
||||
|
@ -32,7 +32,7 @@ import Control.Concurrent.STM
|
||||
import Graphics.UI.Gtk
|
||||
import HSFM.FileSystem.FileOperations
|
||||
import HSFM.FileSystem.FileType
|
||||
import System.INotify
|
||||
import System.INotify.ByteString
|
||||
(
|
||||
INotify
|
||||
)
|
||||
|
@ -64,7 +64,7 @@ import HSFM.GUI.Gtk.Icons
|
||||
import HSFM.GUI.Gtk.Utils
|
||||
import HSFM.Utils.IO
|
||||
import Prelude hiding(readFile)
|
||||
import System.INotify
|
||||
import System.INotify.ByteString
|
||||
(
|
||||
addWatch
|
||||
, initINotify
|
||||
|
Loading…
Reference in New Issue
Block a user