diff options
-rw-r--r-- | indexer/src/pkg.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/indexer/src/pkg.rs b/indexer/src/pkg.rs index 2d725f9..93b7c14 100644 --- a/indexer/src/pkg.rs +++ b/indexer/src/pkg.rs @@ -119,12 +119,8 @@ fn insert_man(tr: &postgres::GenericConnection, verid: i32, paths: &[&str], ent: cont = cont.replace(0 as char, ""); } - // Overwrite entry if the contents are different. It's possible that earlier decoding - // implementations didn't properly detect the encoding. (On the other hand, due to differences - // in filenames it's also possible that THIS decoding step went wrong, but that's slightly less - // likely) tr.execute( - "INSERT INTO contents (hash, content) VALUES($1, $2) ON CONFLICT (hash) DO UPDATE SET content = $2", + "INSERT INTO contents (hash, content) VALUES($1, $2) ON CONFLICT (hash) DO NOTHING", &[&dig.as_ref(), &cont] ).unwrap(); |