1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 06:34:40 +00:00

fix special folder judgement (#7749)

Co-authored-by: 孙永强 <11704063+s-yongqiang@user.noreply.gitee.com>
This commit is contained in:
awu0403
2025-04-20 09:18:54 +08:00
committed by GitHub
parent f24516e88a
commit e11dd9e34c

View File

@@ -21,7 +21,8 @@ const DirDetails = ({ direntDetail }) => {
let size = Utils.bytesToSize(direntDetail.size); let size = Utils.bytesToSize(direntDetail.size);
let special_folder = false; let special_folder = false;
if (direntDetail.path !== undefined) { if (direntDetail.path !== undefined) {
special_folder = SYSTEM_FOLDERS.some(folder => direntDetail.path.startsWith(folder)); const path = direntDetail.path;
special_folder = SYSTEM_FOLDERS.some(prefix => path === prefix || path.startsWith(prefix + '/'));
} }
return ( return (