Fixed incorrect return value of _user_get_file_disk_device_path().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33382 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c51d6579e4
commit
80ea5e3508
|
@ -456,7 +456,11 @@ _user_get_file_disk_device_path(partition_id id, char* buffer,
|
|||
if (fileDevice == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
return user_strlcpy(buffer, fileDevice->FilePath(), bufferSize);
|
||||
ssize_t copied = user_strlcpy(buffer, fileDevice->FilePath(),
|
||||
bufferSize);
|
||||
if (copied < 0)
|
||||
return copied;
|
||||
return (size_t)copied < bufferSize ? B_OK : B_BUFFER_OVERFLOW;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue