packagefs: for symlinks, return the symlink length as size.
Change-Id: I60cc9c751a7426d18e27a9cbb163d43b80bcfa28 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2761 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
42f51416eb
commit
2905c9fcef
@ -91,8 +91,11 @@ UnpackingLeafNode::ModifiedTime() const
|
|||||||
off_t
|
off_t
|
||||||
UnpackingLeafNode::FileSize() const
|
UnpackingLeafNode::FileSize() const
|
||||||
{
|
{
|
||||||
if (PackageLeafNode* packageNode = _ActivePackageNode())
|
if (PackageLeafNode* packageNode = _ActivePackageNode()) {
|
||||||
|
if (S_ISLNK(packageNode->Mode()))
|
||||||
|
return strlen(packageNode->SymlinkPath());
|
||||||
return packageNode->FileSize();
|
return packageNode->FileSize();
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user