* Check the return code of the functions that trigger the work in the
registrar. * Added the constant names to the force parameter (as comments for now). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24292 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+5
-5
@@ -18,7 +18,7 @@ static const char *sProgramName = __progname;
|
|||||||
// options
|
// options
|
||||||
bool gFiles = true;
|
bool gFiles = true;
|
||||||
bool gApps = false;
|
bool gApps = false;
|
||||||
int gForce = 0;
|
int gForce = 0; // B_UPDATE_MIME_INFO_NO_FORCE;
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -49,9 +49,9 @@ process_file(const char *path)
|
|||||||
status = B_ENTRY_NOT_FOUND;
|
status = B_ENTRY_NOT_FOUND;
|
||||||
|
|
||||||
if (gFiles && status >= B_OK)
|
if (gFiles && status >= B_OK)
|
||||||
update_mime_info(path, true, true, gForce);
|
status = update_mime_info(path, true, true, gForce);
|
||||||
if (gApps && status >= B_OK)
|
if (gApps && status >= B_OK)
|
||||||
create_app_meta_mime(path, true, true, gForce);
|
status = create_app_meta_mime(path, true, true, gForce);
|
||||||
|
|
||||||
if (status < B_OK) {
|
if (status < B_OK) {
|
||||||
fprintf(stderr, "%s: \"%s\": %s\n",
|
fprintf(stderr, "%s: \"%s\": %s\n",
|
||||||
@@ -80,9 +80,9 @@ main(int argc, char **argv)
|
|||||||
gApps = true;
|
gApps = true;
|
||||||
gFiles = false;
|
gFiles = false;
|
||||||
} else if (!strcmp(arg, "-f"))
|
} else if (!strcmp(arg, "-f"))
|
||||||
gForce = 1;
|
gForce = 1; // B_UPDATE_MIME_INFO_FORCE_KEEP_TYPE;
|
||||||
else if (!strcmp(arg, "-F"))
|
else if (!strcmp(arg, "-F"))
|
||||||
gForce = 2;
|
gForce = 2; // B_UPDATE_MIME_INFO_FORCE_UPDATE_ALL;
|
||||||
else if (!strcmp(arg, "--help"))
|
else if (!strcmp(arg, "--help"))
|
||||||
usage(0);
|
usage(0);
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user