diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1638,9 +1638,7 @@ func syncRoot(c *syncContext, dbPath []string, fsPath string) error { FROM node AS n JOIN subtree AS s ON n.parent = s.id ) DELETE FROM node WHERE id IN ( SELECT id FROM subtree WHERE level <> 1 AND sha1 IS NULL - -- No idea why one can't put the "node" table in the subselect. - -- The whole query then matches nothing. - AND id NOT IN (SELECT parent FROM subtree) + AND id NOT IN (SELECT parent FROM node WHERE parent IS NOT NULL) )`) if err != nil { return err @@ -2283,7 +2281,7 @@ func (l *linearImage) At(x, y int) color.Color { // isWebPAnimation returns whether the given ReadSeeker starts a WebP animation. // See https://developers.google.com/speed/webp/docs/riff_container func isWebPAnimation(rs io.ReadSeeker) (bool, error) { - b := make([]byte, 17) + b := make([]byte, 21) if _, err := rs.Read(b); err != nil { return false, err } @@ -2293,7 +2291,7 @@ func isWebPAnimation(rs io.ReadSeeker) (bool, error) { return bytes.Equal(b[:4], []byte("RIFF")) && bytes.Equal(b[8:16], []byte("WEBPVP8X")) && - b[16]&0b00000010 != 0, nil + b[20]&0b00000010 != 0, nil } var errIsAnimation = errors.New("cannot perceptually hash animations") |