avoid nub
It's O(N^2) which could matter when there are many dup files using the same key.
This commit is contained in:
parent
b3712b6047
commit
77517ab506
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ handleDropsFrom locs rs reason fromhere key afile si preverified runner = do
|
||||||
l <- map (`fromTopFilePath` g)
|
l <- map (`fromTopFilePath` g)
|
||||||
<$> Database.Keys.getAssociatedFiles key
|
<$> Database.Keys.getAssociatedFiles key
|
||||||
let fs = case afile of
|
let fs = case afile of
|
||||||
AssociatedFile (Just f) -> nub (f : l)
|
AssociatedFile (Just f) -> f : filter (/= f) l
|
||||||
AssociatedFile Nothing -> l
|
AssociatedFile Nothing -> l
|
||||||
n <- getcopies fs
|
n <- getcopies fs
|
||||||
void $ if fromhere && checkcopies n Nothing
|
void $ if fromhere && checkcopies n Nothing
|
||||||
|
|
Loading…
Reference in a new issue