From dbd6f8c1425e1d928d7fcf53f53357c4e51179fb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 17 Aug 2017 14:46:33 -0400 Subject: Prevent spaces from being embedded in the name of new WORM keys, as that handing spaces in keys would complicate things like the external special remote protocol. --- Annex/Locations.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Annex') diff --git a/Annex/Locations.hs b/Annex/Locations.hs index 494badcc6..e12920091 100644 --- a/Annex/Locations.hs +++ b/Annex/Locations.hs @@ -413,7 +413,7 @@ gitAnnexAssistantDefaultDir :: FilePath gitAnnexAssistantDefaultDir = "annex" {- Sanitizes a String that will be used as part of a Key's keyName, - - dealing with characters that cause problems on substandard filesystems. + - dealing with characters that cause problems. - - This is used when a new Key is initially being generated, eg by getKey. - Unlike keyFile and fileKey, it does not need to be a reversable @@ -430,7 +430,7 @@ preSanitizeKeyName = concatMap escape where escape c | isAsciiUpper c || isAsciiLower c || isDigit c = [c] - | c `elem` ".-_ " = [c] -- common, assumed safe + | c `elem` ".-_" = [c] -- common, assumed safe | c `elem` "/%:" = [c] -- handled by keyFile -- , is safe and uncommon, so will be used to escape -- other characters. By itself, it is escaped to -- cgit v1.2.3