Skip to content

Commit

Permalink
abcache.fs: Fix missing ignore_size flag usage (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
mos9527 committed Jan 15, 2025
1 parent b713c6c commit cfbb75c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@
"3.4.0",
"--app-appHash",
"a3015fe8-785f-27e1-fb8b-546a23c82c1f",
"--dump-master-data",
"/Volumes/mos9527弄丢的盘/Reverse/proseka_reverse/masterdata/tw"
],
"justMyCode": true
},
Expand Down
2 changes: 1 addition & 1 deletion sssekai/abcache/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def SEKAI_API_MASTER_SUITE_URLS(self):
for path in self.database.sekai_user_auth_data.suiteMasterSplitPath
]
# NOTE: All ROW servers have hardcoded master data URLs in *one* file as of the time of writing.
# NOTE: The MessagePack schema is also *omitted* in these endpoints. Good luck parsing them.
# NOTE: Some of the MessagePack schemas is also *omitted* in these endpoints. Good luck parsing them.
case "tw":
return [
"https://lf21-mkovscdn-sg.bytedgame.com/obj/sf-game-alisg/gdl_app_5245/MasterData/60001/master-data-138.info"
Expand Down
2 changes: 1 addition & 1 deletion sssekai/abcache/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def _fetch(self, start: int | None, stop: int | None) -> bytes:
stop = self.size
if not self.ignore_size:
stop = min(stop, self.size) # XXX: why didn't fsspec handle this?
if start >= self.size or start >= stop:
if (not self.ignore_size and start >= self.size) or start >= stop:
return b""
start_blk, start_pos = start // self.blocksize, start % self.blocksize
end_blk, end_pos = stop // self.blocksize, stop % self.blocksize
Expand Down

0 comments on commit cfbb75c

Please sign in to comment.