Skip to content

Commit

Permalink
Update app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
xygodcyx committed May 26, 2024
1 parent 74e789d commit 48c59b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const traverseDirectory = (dir, rootDir) => {

const itemPath = path.join(dir, item);
const relativePath = path.relative(__dirname, itemPath);
const relativePathFroImgs = path.relative(rootDir, itemPath);
const stats = fs.statSync(itemPath);

if (stats.isDirectory()) {
Expand All @@ -118,7 +119,7 @@ const traverseDirectory = (dir, rootDir) => {
if (!companies['_files']) {
companies['_files'] = [];
}
const infos = relativePath.split('\\');
const infos = relativePathFroImgs.split('\\');
const company = infos[0];
const app = infos[1];
// const app;
Expand All @@ -129,7 +130,7 @@ const traverseDirectory = (dir, rootDir) => {
name: item.split('.')[0],
company: company === 'folders' ? '' : company,
app: company === 'folders' ? '' : app,
type: getFileType(relativePath),
type: getFileType(relativePathFroImgs),
});
}
}
Expand Down

0 comments on commit 48c59b7

Please sign in to comment.