Revert "+ico"

This reverts commit 1206df59a1.
This commit is contained in:
辉鸭蛋
2024-10-23 23:27:31 +08:00
parent 1206df59a1
commit 11434b072a
87 changed files with 4 additions and 251 deletions

View File

@@ -108,19 +108,12 @@ function generateDirectoryTree(dir, currentDepth = 0, parentFolders = []) {
info.tags = jsInfo.tags;
}
} else {
info.children = fs.readdirSync(dir)
.filter(child => !['desktop.ini', 'icon.ico'].includes(child)) // 过滤掉 desktop.ini 和 icon.ico
.map(child => {
const childPath = path.join(dir, child);
return generateDirectoryTree(childPath, currentDepth + 1, [...parentFolders, info.name]);
});
info.children = fs.readdirSync(dir).map(child => {
const childPath = path.join(dir, child);
return generateDirectoryTree(childPath, currentDepth + 1, [...parentFolders, info.name]);
});
}
} else {
// 如果是 desktop.ini 或 icon.ico 文件,直接返回 null
if (['desktop.ini', 'icon.ico'].includes(info.name)) {
return null;
}
const hash = calculateSHA1(dir);
info.hash = hash;
info.version = hash.substring(0, 7);