Now only prints out the path if the path was initialized successfully - else
the app would crash in this case (because BPath::Path() could return NULL then). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8883 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+4
-1
@@ -35,7 +35,10 @@ PrintMountPoint(dev_t device, bool verbose)
|
||||
BDirectory root;
|
||||
if (volume.GetRootDirectory(&root) == B_OK) {
|
||||
BPath path(&root, NULL);
|
||||
strlcpy(mount, path.Path(), sizeof(mount));
|
||||
if (path.InitCheck() == B_OK)
|
||||
strlcpy(mount, path.Path(), sizeof(mount));
|
||||
else
|
||||
strlcpy(mount, "?", sizeof(mount));
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
|
||||
Reference in New Issue
Block a user