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:
@@ -157,7 +157,7 @@ typedef enum path_base_directory {
|
|||||||
|
|
||||||
/* find_path() only */
|
/* find_path() only */
|
||||||
B_FIND_PATH_IMAGE_PATH = 1000,
|
B_FIND_PATH_IMAGE_PATH = 1000,
|
||||||
B_FIND_PATH_IMAGE_PACKAGE_PATH,
|
B_FIND_PATH_PACKAGE_PATH,
|
||||||
} path_base_directory;
|
} path_base_directory;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ static const DirectoryConstantEntry kDirectoryConstants[] = {
|
|||||||
"the translator add-ons directory"),
|
"the translator add-ons directory"),
|
||||||
DEFINE_CONSTANT(B_FIND_PATH_VAR_DIRECTORY,
|
DEFINE_CONSTANT(B_FIND_PATH_VAR_DIRECTORY,
|
||||||
"the Unix var directory (global writable data)"),
|
"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"),
|
"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";
|
return "/var";
|
||||||
|
|
||||||
case B_FIND_PATH_IMAGE_PATH:
|
case B_FIND_PATH_IMAGE_PATH:
|
||||||
case B_FIND_PATH_IMAGE_PACKAGE_PATH:
|
case B_FIND_PATH_PACKAGE_PATH:
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -510,11 +510,11 @@ internal_path_for_path(char* referencePath, size_t referencePathSize,
|
|||||||
if (installationLocation == NULL)
|
if (installationLocation == NULL)
|
||||||
return B_ENTRY_NOT_FOUND;
|
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
|
// simply adjust our arguments to look the package file up in the packages
|
||||||
// directory.
|
// directory.
|
||||||
char packageName[B_FILE_NAME_LENGTH];
|
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",
|
error = get_file_attribute(referencePath, "SYS:PACKAGE_FILE",
|
||||||
packageName, sizeof(packageName));
|
packageName, sizeof(packageName));
|
||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
|
|||||||
Reference in New Issue
Block a user