Chunk-piece length comparison fix (#55)

This commit is contained in:
Arifcan Balta 2023-12-13 20:53:27 +03:00 committed by GitHub
parent cc24623a82
commit 911bf3a0d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 24 deletions

View file

@ -1,5 +1,5 @@
{
"name": "webui",
"name": "rqbit-webui",
"lockfileVersion": 3,
"requires": true,
"packages": {
@ -329,16 +329,16 @@
"node": ">=6.9.0"
}
},
"node_modules/@esbuild/darwin-arm64": {
"node_modules/@esbuild/win32-x64": {
"version": "0.18.20",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz",
"integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz",
"integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==",
"cpu": [
"arm64"
"x64"
],
"optional": true,
"os": [
"darwin"
"win32"
],
"engines": {
"node": ">=12"
@ -761,19 +761,6 @@
"node": ">=0.8.0"
}
},
"node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/gensync": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",

View file

@ -1,9 +1,10 @@
{
"name": "webui",
"name": "rqbit-webui",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "rqbit-webui",
"dependencies": {
"@vitejs/plugin-react": "^4.2.1",
"lodash.debounce": "^4.0.8",

View file

@ -82,9 +82,9 @@ impl Lengths {
if !(is_power_of_two(chunk_length as u64)) {
anyhow::bail!("chunk length {} is not a power of 2", chunk_length);
}
if chunk_length >= piece_length {
if chunk_length > piece_length {
anyhow::bail!(
"chunk length {} should be smaller than pice length {}",
"chunk length {} should be smaller than or equal to piece length {}",
chunk_length,
piece_length
);

View file

@ -2217,8 +2217,7 @@ dependencies = [
[[package]]
name = "network-interface"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d68759ef97fe9c9e46f79ea8736c19f1d28992e24c8dc8ce86752918bfeaae7"
source = "git+https://github.com/ikatson/network-interface?branch=compile-on-freebsd#aca8a95ab1bb41a27bc82c6a2425eb4824bf0352"
dependencies = [
"cc",
"libc",