File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -68,14 +68,18 @@ export async function fetchProject(
6868 storage : commonStorage . Storage , projectName : string ) : Promise < Project > {
6969 await upgradeProjectIfNecessary ( storage , projectName ) ;
7070
71- const modulePaths : string [ ] = await storage . listFilePaths (
72- storageNames . makeModulePathRegexPattern ( projectName ) ) ;
71+ const projectFileNames : string [ ] = await storage . list (
72+ storageNames . makeProjectDirectoryPath ( projectName ) ) ;
7373
7474 let project : Project | null = null ;
75- const mechanisms : storageModule . Mechanism [ ] = [ ]
75+ const mechanisms : storageModule . Mechanism [ ] = [ ] ;
7676 const opModes : storageModule . OpMode [ ] = [ ] ;
7777
78- for ( const modulePath of modulePaths ) {
78+ for ( const projectFileName of projectFileNames ) {
79+ if ( ! storageNames . isValidModuleFileName ( projectFileName ) ) {
80+ continue ;
81+ }
82+ const modulePath = storageNames . makeFilePath ( projectName , projectFileName ) ;
7983 const moduleContentText = await storage . fetchFileContentText ( modulePath ) ;
8084 const moduleContent : storageModuleContent . ModuleContent =
8185 storageModuleContent . parseModuleContentText ( moduleContentText ) ;
You can’t perform that action at this time.
0 commit comments