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:
Ingo Weinhold
2013-11-19 02:05:35 +01:00
parent 0bc615438a
commit 22e92014f0
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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"),
}; };
+3 -3
View File
@@ -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)