GUI: clean up copyFinal
Don't show CopyModeChooserDialog for file copy operations.
This commit is contained in:
parent
98216a97c3
commit
5bfea0db10
@ -170,13 +170,14 @@ copyFinal :: MyGUI -> MyView -> IO ()
|
|||||||
copyFinal mygui myview = do
|
copyFinal mygui myview = do
|
||||||
op <- readTVarIO (operationBuffer myview)
|
op <- readTVarIO (operationBuffer myview)
|
||||||
case op of
|
case op of
|
||||||
FCopy (CP1 sourceDir) -> do
|
FCopy (CP1 source) -> do
|
||||||
curDir <- anchor <$> readTVarIO (fsState myview)
|
dest <- anchor <$> readTVarIO (fsState myview)
|
||||||
let cmsg = "Really copy file \"" ++ sourceDir
|
isFile <- doesFileExist source
|
||||||
++ "\"" ++ " to \"" ++ curDir ++ "\"?"
|
let cmsg = "Really copy file \"" ++ source
|
||||||
|
++ "\"" ++ " to \"" ++ dest ++ "\"?"
|
||||||
withConfirmationDialog cmsg $ do
|
withConfirmationDialog cmsg $ do
|
||||||
copyMode <- showCopyModeChooserDialog
|
copyMode <- if isFile then return Strict else showCopyModeChooserDialog
|
||||||
withErrorDialog ((runFileOp . FCopy . CC sourceDir curDir $ copyMode)
|
withErrorDialog ((runFileOp . FCopy . CC source dest $ copyMode)
|
||||||
>> refreshTreeView mygui myview Nothing)
|
>> refreshTreeView mygui myview Nothing)
|
||||||
_ -> return ()
|
_ -> return ()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user