Tracker: sbuf => statbuf used elsewhere, check GetStat() status.

Change-Id: I08515297712f1b36a513d944847c1383ba4e8158
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10633
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
John Scipione
2026-03-31 17:04:07 +00:00
committed by waddlesplash
parent 5187da4c76
commit 3c0110ad24
+4 -4
View File
@@ -2682,12 +2682,12 @@ FSGetTrashDir(BDirectory* trashDir, dev_t dev)
if (result == B_OK) {
// make Trash directory invisible
StatStruct sbuf;
trashDir->GetStat(&sbuf);
PoseInfo poseInfo;
poseInfo.fInvisible = true;
poseInfo.fInitedDirectory = sbuf.st_ino;
StatStruct statbuf;
poseInfo.fInitedDirectory = trashDir->GetStat(&statbuf) == B_OK ? statbuf.st_ino : -1LL;
trashDir->WriteAttr(kAttrPoseInfo, B_RAW_TYPE, 0, &poseInfo, sizeof(PoseInfo));
}