Fix bug in setkey subcommand triggered by move --to.

This commit is contained in:
Joey Hess 2010-11-27 17:07:22 -04:00
parent e97d13e29b
commit e0518a4adc
2 changed files with 5 additions and 1 deletions

View file

@ -35,7 +35,10 @@ perform :: FilePath -> Key -> SubCmdPerform
perform file key = do
-- the file might be on a different filesystem, so mv is used
-- rather than simply calling moveToObjectDir key file
ok <- getViaTmp key $ \dest -> liftIO $ boolSystem "mv" [file, dest]
ok <- getViaTmp key $ \dest -> do
if dest /= file
then liftIO $ boolSystem "mv" [file, dest]
else return True
if ok
then return $ Just $ cleanup key
else error "mv failed!"

1
debian/changelog vendored
View file

@ -1,6 +1,7 @@
git-annex (0.09) UNRELEASED; urgency=low
* Add copy subcommand.
* Fix bug in setkey subcommand triggered by move --to.
-- Joey Hess <joeyh@debian.org> Sat, 27 Nov 2010 16:58:33 -0400