s/B_FIND_PATH_IMAGE_PACKAGE_PATH/B_FIND_PATH_PACKAGE_PATH/
It doesn't only work for image files, so make the name more general.
This commit is contained in:
parent
0bc615438a
commit
22e92014f0
@ -157,7 +157,7 @@ typedef enum path_base_directory {
|
||||
|
||||
/* find_path() only */
|
||||
B_FIND_PATH_IMAGE_PATH = 1000,
|
||||
B_FIND_PATH_IMAGE_PACKAGE_PATH,
|
||||
B_FIND_PATH_PACKAGE_PATH,
|
||||
} path_base_directory;
|
||||
|
||||
|
||||
|
@ -76,7 +76,7 @@ static const DirectoryConstantEntry kDirectoryConstants[] = {
|
||||
"the translator add-ons directory"),
|
||||
DEFINE_CONSTANT(B_FIND_PATH_VAR_DIRECTORY,
|
||||
"the Unix var directory (global writable data)"),
|
||||
DEFINE_CONSTANT(B_FIND_PATH_IMAGE_PACKAGE_PATH,
|
||||
DEFINE_CONSTANT(B_FIND_PATH_PACKAGE_PATH,
|
||||
"the path of the package the file specified via -p belongs to"),
|
||||
};
|
||||
|
||||
|
@ -216,7 +216,7 @@ get_relative_directory_path(size_t installationLocationIndex,
|
||||
return "/var";
|
||||
|
||||
case B_FIND_PATH_IMAGE_PATH:
|
||||
case B_FIND_PATH_IMAGE_PACKAGE_PATH:
|
||||
case B_FIND_PATH_PACKAGE_PATH:
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
@ -510,11 +510,11 @@ internal_path_for_path(char* referencePath, size_t referencePathSize,
|
||||
if (installationLocation == NULL)
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
|
||||
// Handle B_FIND_PATH_IMAGE_PACKAGE_PATH: get the package file name and
|
||||
// Handle B_FIND_PATH_PACKAGE_PATH: get the package file name and
|
||||
// simply adjust our arguments to look the package file up in the packages
|
||||
// directory.
|
||||
char packageName[B_FILE_NAME_LENGTH];
|
||||
if (baseDirectory == B_FIND_PATH_IMAGE_PACKAGE_PATH) {
|
||||
if (baseDirectory == B_FIND_PATH_PACKAGE_PATH) {
|
||||
error = get_file_attribute(referencePath, "SYS:PACKAGE_FILE",
|
||||
packageName, sizeof(packageName));
|
||||
if (error != B_OK)
|
||||
|
Loading…
Reference in New Issue
Block a user