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:
Axel Dörfler
2008-01-21 14:45:49 +00:00
parent 64fe37ee89
commit 0fc3b83496
+6 -6
View File
@@ -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);