diff --git a/3rdparty/hpath b/3rdparty/hpath index 1263fac..6638cd8 160000 --- a/3rdparty/hpath +++ b/3rdparty/hpath @@ -1 +1 @@ -Subproject commit 1263fac7ec0d859550bc8145ce63872f15aaebeb +Subproject commit 6638cd8cc1f40e3183039186b7c5d4cccc4aa7f7 diff --git a/README.md b/README.md index 48d284e..9fd92af 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,6 @@ Installation git submodule update --init --recursive cabal sandbox init cabal sandbox add-source 3rdparty/hpath -cabal sandbox add-source 3rdparty/hpath/3rdparty/posix-paths cabal sandbox add-source 3rdparty/simple-sendfile cabal install alex happy export PATH="$(pwd)/.cabal-sandbox/bin:$PATH" diff --git a/hsfm.cabal b/hsfm.cabal index 73413c0..df579c1 100644 --- a/hsfm.cabal +++ b/hsfm.cabal @@ -41,7 +41,6 @@ library hpath, mtl >= 2.2, old-locale >= 1, - posix-paths, process, safe, simple-sendfile, @@ -91,7 +90,6 @@ executable hsfm-gtk hsfm, mtl >= 2.2, old-locale >= 1, - posix-paths, process, safe, simple-sendfile, diff --git a/src/HSFM/FileSystem/Errors.hs b/src/HSFM/FileSystem/Errors.hs index 84f1feb..fd615f6 100644 --- a/src/HSFM/FileSystem/Errors.hs +++ b/src/HSFM/FileSystem/Errors.hs @@ -54,6 +54,10 @@ import HPath Abs , Path ) +import HPath.IO + ( + canonicalizePath + ) import HSFM.Utils.IO import System.IO.Error ( @@ -204,7 +208,7 @@ throwDestinationInSource :: Path Abs -- ^ source dir -> IO () throwDestinationInSource source dest = do dest' <- (\x -> maybe x (\y -> x P. y) $ P.basename dest) - <$> (P.canonicalizePath $ P.dirname dest) + <$> (canonicalizePath $ P.dirname dest) dids <- forM (P.getAllParents dest') $ \p -> do fs <- PF.getSymbolicLinkStatus (P.fromAbs p) return (PF.deviceID fs, PF.fileID fs) diff --git a/src/HSFM/GUI/Gtk/MyView.hs b/src/HSFM/GUI/Gtk/MyView.hs index fdab781..f9a6412 100644 --- a/src/HSFM/GUI/Gtk/MyView.hs +++ b/src/HSFM/GUI/Gtk/MyView.hs @@ -37,6 +37,7 @@ import Control.Exception try , SomeException ) +import qualified Data.ByteString as BS import Data.Foldable ( for_ @@ -76,6 +77,10 @@ import System.INotify , killINotify , EventVariety(..) ) +import System.Posix.FilePath + ( + pathSeparator + ) @@ -303,7 +308,7 @@ refreshView mygui myview mfp = Item) case ecd of Right dir -> return (Just $ path dir) - Left _ -> return (P.parseAbs P.pathSeparator') + Left _ -> return (P.parseAbs $ BS.singleton pathSeparator) -- |Refreshes the View based on the given directory.