The AutoMounter should not keep a BDirectory object around that points to the
volumes root directory when trying to unmount it. This fixes bug #1694. Thanks to Ingo for investigating this! :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23685 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -261,13 +261,13 @@ AutoMounter::_UnmountAndEjectVolume(BMessage *message)
|
||||
if (status < B_OK)
|
||||
snprintf(name, sizeof(name), "device:%ld", device);
|
||||
|
||||
BDirectory mountPoint;
|
||||
if (status == B_OK)
|
||||
status = volume.GetRootDirectory(&mountPoint);
|
||||
|
||||
BPath path;
|
||||
if (status == B_OK)
|
||||
status = path.SetTo(&mountPoint, ".");
|
||||
if (status == B_OK) {
|
||||
BDirectory mountPoint;
|
||||
status = volume.GetRootDirectory(&mountPoint);
|
||||
if (status == B_OK)
|
||||
status = path.SetTo(&mountPoint, ".");
|
||||
}
|
||||
|
||||
if (status == B_OK) {
|
||||
status = fs_unmount_volume(path.Path(), 0);
|
||||
|
||||
Reference in New Issue
Block a user