Skip to content

Commit

Permalink
lessen split-joins
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Sep 7, 2023
1 parent 8faef21 commit 32f875d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ async function fastifyStatic (fastify, opts) {
const roots = Array.isArray(sendOptions.root) ? sendOptions.root : [sendOptions.root]
for (let i = 0; i < roots.length; ++i) {
const rootPath = roots[i]
const files = await glob(path.join(rootPath, globPattern).split(path.win32.sep).join(path.posix.sep), { follow: true, nodir: true, dot: opts.serveDotFiles })
const posixRootPath = rootPath.split(path.win32.sep).join(path.posix.sep)
const files = await glob(path.posix.join(rootPath, globPattern), { follow: true, nodir: true, dot: opts.serveDotFiles })

for (let i = 0; i < files.length; ++i) {
const file = files[i].split(path.win32.sep).join(path.posix.sep)
Expand Down

0 comments on commit 32f875d

Please sign in to comment.