Skip to content

Commit 5ab15a1

Browse files
committed
feat: add index directory separated in shards
1 parent c54a159 commit 5ab15a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/files/index.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ fn load_package(
5858
index_path: &Path,
5959
overrides_path: &Path,
6060
) -> Result<Package, Box<dyn Error>> {
61-
let index_file = index_path.join(format!("{}.json", name));
61+
let shard_dir = name.chars().next().unwrap().to_string().to_lowercase();
62+
let index_file = index_path
63+
.join(&Path::new(&shard_dir))
64+
.join(format!("{}.json", name));
6265
let override_file = overrides_path.join(format!("{}.json", name));
6366

6467
if override_file.exists() {

0 commit comments

Comments
 (0)