addurl: Better sanitization of generated filenames.
Use sanitizeFilePath rather than rolling our own sanitizer.
This commit is contained in:
parent
cf428895a2
commit
478eeea02e
2 changed files with 3 additions and 2 deletions
|
@ -223,6 +223,6 @@ url2file url pathdepth pathmax = case pathdepth of
|
|||
where
|
||||
fullurl = uriRegName auth ++ uriPath url ++ uriQuery url
|
||||
frombits a = intercalate "/" $ a urlbits
|
||||
urlbits = map (truncateFilePath pathmax . escape) $ filter (not . null) $ split "/" fullurl
|
||||
urlbits = map (truncateFilePath pathmax . sanitizeFilePath) $
|
||||
filter (not . null) $ split "/" fullurl
|
||||
auth = fromMaybe (error $ "bad url " ++ show url) $ uriAuthority url
|
||||
escape = replace "/" "_" . replace "?" "_"
|
||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -6,6 +6,7 @@ git-annex (4.20131003) UNRELEASED; urgency=low
|
|||
* watcher: Detect at startup time when there is a stale .git/lock,
|
||||
and remove it so it does not interfere with the automatic
|
||||
commits of changed files.
|
||||
* addurl: Better sanitization of generated filenames.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Thu, 03 Oct 2013 15:41:24 -0400
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue