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