* Registering a file device now also normalizes the path now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28068 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-10-13 23:49:52 +00:00
parent b16cba7bb5
commit 260e077ff7

View File

@ -463,11 +463,13 @@ _user_register_file_device(const char *_filename)
if (error != B_OK)
return error;
KPath path(filename, true);
KDiskDeviceManager *manager = KDiskDeviceManager::Default();
if (ManagerLocker locker = manager) {
if (KFileDiskDevice *device = manager->FindFileDevice(filename))
if (KFileDiskDevice *device = manager->FindFileDevice(path.Path()))
return device->ID();
return manager->CreateFileDevice(filename);
return manager->CreateFileDevice(path.Path());
}
return B_ERROR;
}