Skip to content

Commit

Permalink
Merge pull request #22110 from jankoritak/21636-fix-locating-stories-…
Browse files Browse the repository at this point in the history
…with-specials-chars-in-path

Indexer: Improve locating stories with specials chars in path
  • Loading branch information
valentinpalkovic authored Jul 2, 2024
2 parents 4931b38 + 95b7131 commit 4f81812
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions code/core/src/core-server/utils/StoryIndexGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,16 @@ export class StoryIndexGenerator {
this.specifiers.map(async (specifier) => {
const pathToSubIndex = {} as SpecifierStoriesCache;

const fullGlob = slash(
path.join(this.options.workingDir, specifier.directory, specifier.files)
);
const fullGlob = slash(path.join(specifier.directory, specifier.files));

// Dynamically import globby because it is a pure ESM module
const { globby } = await import('globby');

const files = await globby(fullGlob, commonGlobOptions(fullGlob));
const files = await globby(fullGlob, {
absolute: true,
cwd: this.options.workingDir,
...commonGlobOptions(fullGlob),
});

if (files.length === 0) {
once.warn(
Expand Down

0 comments on commit 4f81812

Please sign in to comment.