From 5c82c99c766f50b492df8255767b90adc17c4b17 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 23 Jul 2013 13:38:05 -0400 Subject: [PATCH] webapp: When creating a repository on a removable drive, set core.fsyncobjectfiles, to help prevent data loss when the drive is yanked. --- Assistant/WebApp/Configurators/Local.hs | 4 ++++ debian/changelog | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Assistant/WebApp/Configurators/Local.hs b/Assistant/WebApp/Configurators/Local.hs index 5f20972856..27cf526cb8 100644 --- a/Assistant/WebApp/Configurators/Local.hs +++ b/Assistant/WebApp/Configurators/Local.hs @@ -268,6 +268,10 @@ getFinishAddDriveR drive = make >>= redirect . EditNewRepositoryR liftIO $ createDirectoryIfMissing True dir isnew <- liftIO $ makeRepo dir True u <- liftIO $ initRepo isnew False dir $ Just remotename + {- Removable drives are not reliable media, so enable fsync. -} + liftIO $ inDir dir $ + setConfig (ConfigKey "core.fsyncobjectfiles") + (boolConfig True) r <- combineRepos dir remotename liftAnnex $ setStandardGroup u TransferGroup liftAssistant $ syncRemote r diff --git a/debian/changelog b/debian/changelog index bbcf6c14df..f930df2ab4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ git-annex (4.20130724) UNRELEASED; urgency=low * Add status message to XMPP presence tag, to identify to others that the client is a git-annex client. Closes: #717652 + * webapp: When creating a repository on a removable drive, set + core.fsyncobjectfiles, to help prevent data loss when the drive is yanked. -- Joey Hess Tue, 23 Jul 2013 12:39:48 -0400