LIB: formatting, add TODO
This commit is contained in:
parent
ec6aa8fab1
commit
36768519a3
@ -96,6 +96,8 @@ import qualified Data.ByteString as BS
|
|||||||
|
|
||||||
|
|
||||||
-- TODO: file operations should be threaded and not block the UI
|
-- TODO: file operations should be threaded and not block the UI
|
||||||
|
-- TODO: make sure we do the right thing for BlockDev, CharDev etc...
|
||||||
|
-- most operations are not implemented for these
|
||||||
|
|
||||||
|
|
||||||
-- |Data type describing an actual file operation that can be
|
-- |Data type describing an actual file operation that can be
|
||||||
@ -176,9 +178,9 @@ copyDir cm from@(_ :/ Dir fromn (FileInfo { fileMode = fmode }))
|
|||||||
for_ contents $ \f ->
|
for_ contents $ \f ->
|
||||||
case f of
|
case f of
|
||||||
(_ :/ SymLink {}) -> recreateSymlink f destdir
|
(_ :/ SymLink {}) -> recreateSymlink f destdir
|
||||||
(_ :/ Dir {}) -> copyDir cm f destdir
|
(_ :/ Dir {}) -> copyDir cm f destdir
|
||||||
(_ :/ RegFile {}) -> copyFileToDir f destdir
|
(_ :/ RegFile {}) -> copyFileToDir f destdir
|
||||||
_ -> return ()
|
_ -> return ()
|
||||||
where
|
where
|
||||||
createDestdir destdir fmode =
|
createDestdir destdir fmode =
|
||||||
case cm of
|
case cm of
|
||||||
@ -208,7 +210,7 @@ copyDir _ _ _ = throw $ InvalidOperation "wrong input type"
|
|||||||
-- |Recreate a symlink.
|
-- |Recreate a symlink.
|
||||||
recreateSymlink :: AnchoredFile FileInfo -- ^ the old symlink file
|
recreateSymlink :: AnchoredFile FileInfo -- ^ the old symlink file
|
||||||
-> AnchoredFile FileInfo -- ^ destination dir of the
|
-> AnchoredFile FileInfo -- ^ destination dir of the
|
||||||
-- new symlink file
|
-- new symlink file
|
||||||
-> IO ()
|
-> IO ()
|
||||||
recreateSymlink AFileInvFN _ = throw InvalidFileName
|
recreateSymlink AFileInvFN _ = throw InvalidFileName
|
||||||
recreateSymlink _ AFileInvFN = throw InvalidFileName
|
recreateSymlink _ AFileInvFN = throw InvalidFileName
|
||||||
|
Loading…
Reference in New Issue
Block a user