import: Let --force overwrite symlinks, not only regular files
The docs already implied this should work.
This commit is contained in:
parent
572a340fc5
commit
5ab97333e4
3 changed files with 9 additions and 1 deletions
|
@ -146,7 +146,12 @@ startLocal largematcher mode (srcfile, destfile) =
|
|||
Nothing -> importfilechecked ld k
|
||||
Just s
|
||||
| isDirectory s -> notoverwriting "(is a directory)"
|
||||
| isSymbolicLink s -> notoverwriting "(is a symlink)"
|
||||
| isSymbolicLink s -> ifM (Annex.getState Annex.force)
|
||||
( do
|
||||
liftIO $ nukeFile destfile
|
||||
importfilechecked ld k
|
||||
, notoverwriting "(is a symlink)"
|
||||
)
|
||||
| otherwise -> ifM (Annex.getState Annex.force)
|
||||
( do
|
||||
liftIO $ nukeFile destfile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue