Skip to content

Commit 723e398

Browse files
committed
chore: add comments
1 parent e08bd05 commit 723e398

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/server.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ export class BlobsServer {
258258
try {
259259
const allStores = await fs.readdir(rootPath)
260260
const filteredStores = allStores
261+
// Store names are URI-encoded on Windows, so we must decode them first.
261262
.map((store) => (platform === 'win32' ? decodeURIComponent(store) : store))
262263
.filter((store) => store.startsWith(prefix))
263264

@@ -335,8 +336,8 @@ export class BlobsServer {
335336
return { rootPath }
336337
}
337338

338-
// On Windows, file paths can't include the `:` character, which is used in
339-
// deploy-scoped stores.
339+
// On Windows, file paths can't include the `:` character, so we URI-encode
340+
// them.
340341
const storeName = platform === 'win32' ? encodeURIComponent(rawStoreName) : rawStoreName
341342
const storePath = resolve(rootPath, storeName)
342343
const dataPath = resolve(storePath, ...key)

0 commit comments

Comments
 (0)