1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-27 11:01:14 +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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,7 +21,8 @@ const DirDetails = ({ direntDetail }) => {
let size = Utils.bytesToSize(direntDetail.size);
let special_folder = false;
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 (