Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
corrideat committed Apr 1, 2024
1 parent eb82d04 commit b4735b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ route.POST('/deleteFile/{hash}', {
const existingResources = await sbp('chelonia/db/get', resourcesKey)
if (!existingResources) return
if (existingResources.endsWith(hash)) {
await sbp('chelonia/db/set', resourcesKey, existingResources.slice(0, hash.length + 1))
await sbp('chelonia/db/set', resourcesKey, existingResources.slice(0, -hash.length - 1))
return
}
const hashIndex = existingResources.indexOf(hash + '\x00')
Expand Down

0 comments on commit b4735b1

Please sign in to comment.