From 849a4b1a0d71071a602f552125fd7e25689662db Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 28 Feb 2015 17:23:13 -0400 Subject: When re-execing git-annex, use current program location, rather than ~/.config/git-annex/program, when possible. Most of the time, there will be no discreprancy between programPath and readProgramFile. But, the programFile might have been written by an old version of git-annex that is still installed, while a newer one is currently running. In this case, we want to run the same one that's currently running. This is especially important for things like the GIT_SSH=git-annex used for ssh connection caching. The only code that still uses readProgramFile directly is the upgrade code, which needs to know where the standalone git-annex was installed, in order to upgrade it. --- Assistant/Threads/Transferrer.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Assistant/Threads/Transferrer.hs') diff --git a/Assistant/Threads/Transferrer.hs b/Assistant/Threads/Transferrer.hs index 073dbef3c..9e9256e3a 100644 --- a/Assistant/Threads/Transferrer.hs +++ b/Assistant/Threads/Transferrer.hs @@ -11,13 +11,13 @@ import Assistant.Common import Assistant.TransferQueue import Assistant.TransferSlots import Logs.Transfer -import Config.Files +import Annex.Path import Utility.Batch {- Dispatches transfers from the queue. -} transfererThread :: NamedThread transfererThread = namedThread "Transferrer" $ do - program <- liftIO readProgramFile + program <- liftIO programPath batchmaker <- liftIO getBatchCommandMaker forever $ inTransferSlot program batchmaker $ maybe (return Nothing) (uncurry genTransfer) -- cgit v1.2.3