GTK: clear move buffer after move
Doesn't make sense to keep it since the buffer will probably point to a non-existing file afterwards.
This commit is contained in:
parent
8b8c9a669f
commit
9b43814846
@ -352,7 +352,7 @@ copyInit _ _ _ = withErrorDialog
|
|||||||
|
|
||||||
-- |Finalizes a file operation, such as copy or move.
|
-- |Finalizes a file operation, such as copy or move.
|
||||||
operationFinal :: MyGUI -> MyView -> Maybe Item -> IO ()
|
operationFinal :: MyGUI -> MyView -> Maybe Item -> IO ()
|
||||||
operationFinal _ myview mitem = withErrorDialog $ do
|
operationFinal mygui myview mitem = withErrorDialog $ do
|
||||||
op <- readTVarIO (operationBuffer myview)
|
op <- readTVarIO (operationBuffer myview)
|
||||||
cdir <- case mitem of
|
cdir <- case mitem of
|
||||||
Nothing -> path <$> getCurrentDir myview
|
Nothing -> path <$> getCurrentDir myview
|
||||||
@ -363,15 +363,16 @@ operationFinal _ myview mitem = withErrorDialog $ do
|
|||||||
++ " to \"" ++ P.fpToString (P.fromAbs cdir)
|
++ " to \"" ++ P.fpToString (P.fromAbs cdir)
|
||||||
++ "\"?"
|
++ "\"?"
|
||||||
withConfirmationDialog cmsg . withCopyModeDialog
|
withConfirmationDialog cmsg . withCopyModeDialog
|
||||||
$ \cm -> void $ runFileOp (FMove . MC s cdir $ cm)
|
$ \cm -> do
|
||||||
return ()
|
void $ runFileOp (FMove . MC s cdir $ cm)
|
||||||
|
popStatusbar mygui
|
||||||
|
writeTVarIO (operationBuffer myview) None
|
||||||
FCopy (CP1 s) -> do
|
FCopy (CP1 s) -> do
|
||||||
let cmsg = "Really copy " ++ imsg s
|
let cmsg = "Really copy " ++ imsg s
|
||||||
++ " to \"" ++ P.fpToString (P.fromAbs cdir)
|
++ " to \"" ++ P.fpToString (P.fromAbs cdir)
|
||||||
++ "\"?"
|
++ "\"?"
|
||||||
withConfirmationDialog cmsg . withCopyModeDialog
|
withConfirmationDialog cmsg . withCopyModeDialog
|
||||||
$ \cm -> void $ runFileOp (FCopy . CC s cdir $ cm)
|
$ \cm -> void $ runFileOp (FCopy . CC s cdir $ cm)
|
||||||
return ()
|
|
||||||
_ -> return ()
|
_ -> return ()
|
||||||
where
|
where
|
||||||
imsg s = case s of
|
imsg s = case s of
|
||||||
|
Loading…
Reference in New Issue
Block a user