From 9ab9ef3ebd931549b41d40c73ceeeba82a8099cc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 17 Jul 2012 17:16:30 -0400 Subject: change transfer lock filenames to avoid ambiguity foo.lck could be a lock file for a transfer of foo, or a transfer of a key that happened to end in ".lck". Fix this by using "lck.foo" instead. --- Logs/Transfer.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs index 8b8804127..daec476ef 100644 --- a/Logs/Transfer.hs +++ b/Logs/Transfer.hs @@ -67,7 +67,7 @@ fieldTransfer direction key a = do =<< Fields.getField Fields.remoteUUID {- Runs a transfer action. Creates and locks the lock file while the - - action is running, and stores into in the transfer information + - action is running, and stores info in the transfer information - file. Will throw an error if the transfer is already in progress. -} transfer :: Transfer -> Maybe FilePath -> Annex a -> Annex a @@ -139,7 +139,7 @@ transferFile (Transfer direction u key) r = gitAnnexTransferDir r {- The transfer lock file corresponding to a given transfer info file. -} transferLockFile :: FilePath -> FilePath -transferLockFile infofile = infofile ++ ".lck" +transferLockFile infofile = "lck." ++ infofile {- Parses a transfer information filename to a Transfer. -} parseTransferFile :: FilePath -> Maybe Transfer -- cgit v1.2.3