Annexed file contents are now made unwritable and put in unwriteable directories, to avoid them accidentially being removed or modified. (Thanks Josh Triplett for the idea.)
This commit is contained in:
parent
8dd9f8e49e
commit
1d32d902c9
8 changed files with 74 additions and 49 deletions
|
@ -7,12 +7,8 @@
|
|||
|
||||
module Command.DropKey where
|
||||
|
||||
import Control.Monad.State (liftIO)
|
||||
import System.Directory
|
||||
|
||||
import Command
|
||||
import qualified Annex
|
||||
import Locations
|
||||
import qualified Backend
|
||||
import LocationLog
|
||||
import Types
|
||||
|
@ -36,9 +32,7 @@ start keyname = do
|
|||
|
||||
perform :: Key -> SubCmdPerform
|
||||
perform key = do
|
||||
g <- Annex.gitRepo
|
||||
let loc = annexLocation g key
|
||||
liftIO $ removeFile loc
|
||||
removeAnnex key
|
||||
return $ Just $ cleanup key
|
||||
|
||||
cleanup :: Key -> SubCmdCleanup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue