#16441: BEntry fails to add volume name to BPath (non BeFS volumes)
------------------------------------+--------------------------
Reporter: smallstepforman | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: File Systems | Version: R1/beta2
Keywords: BEntry entry_ref BPath | Blocked By:
Blocking: | Platform: All
------------------------------------+--------------------------
When receiving an entry_ref from RefsReceived(), and constructing a BPath
from the BEntry, if the file originates on a non BeFS volume, the volume
name is not passed to BPath.
I have a BeFS volume and an NTFS volume. I'm attempting to drag/drop the
following file:
/MyNtfsPartition/Videos/video_01.mp4
The following code is used to receive an entry_ref:
void MyWindow :: RefsReceived(BMessage* message)
{
entry_ref ref;
for (int i = 0; message->FindRef("refs", i, &ref) == B_OK; i++)
{
BEntry entry(&ref, true);
if (entry.InitCheck() == B_NO_ERROR)
{
BPath path;
entry.GetPath(&path);
printf("File path = %s\n", path.Path());
}
}
}
The output is /Videos/video_01.mp4. I was expecting
/MyNtfsPartition/Videos/video_01.mp4. This obviously causes problems
since I cannot open /Videos/video_01.mp4 since it fails to resolve the
link.
When doing the same for BeFS files, there is no issue.
--
Ticket URL: <https://dev.haiku-os.org/ticket/16441>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.