Pull kind from non-indexed paths in explorerItem handling (#2002)

This commit is contained in:
Brendan Allan 2024-01-26 17:19:09 +08:00 committed by GitHub
parent cd8d369cec
commit 5fdea8eea6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,6 +39,8 @@ export function getExplorerItemData(data?: ExplorerItem | null): ItemData {
const object = getItemObject(data);
if (object?.kind) itemData.kind = ObjectKind[object?.kind] ?? 'Unknown';
else if(data.type === "NonIndexedPath") itemData.kind = ObjectKind[data.item.kind] ?? 'Unknown';
// Objects only have dateCreated and dateAccessed
itemData.dateCreated = object?.date_created ?? null;
itemData.dateAccessed = object?.date_accessed ?? null;