Changed the semantics of create_app_meta_mime(): Like update_mime_info()
it does now accept directories and doesn't ignore the "recursive" parameter anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25308 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -111,11 +111,13 @@ update_mime_info(const char *path, int recursive, int synchronous, int force)
|
|||||||
|
|
||||||
// create_app_meta_mime
|
// create_app_meta_mime
|
||||||
/*! Creates a MIME database entry for one or more applications.
|
/*! Creates a MIME database entry for one or more applications.
|
||||||
\a path should either point to an application file or should be \c NULL.
|
If \a path points to an application file, a MIME DB entry is create for the
|
||||||
In the first case a MIME database entry for that application is created,
|
application. If it points to a directory and \a recursive is non-null,
|
||||||
in the second case entries for all applications are created.
|
entries are created for all application files in the given directory
|
||||||
\param path The path to an application file, or \c NULL.
|
tree. If path is \c NULL all files are considered; \a recursive is
|
||||||
\param recursive Currently unused.
|
ignored in this case.
|
||||||
|
\param path The path to an application file, a directory, or \c NULL.
|
||||||
|
\param recursive Non-null to trigger recursive behavior.
|
||||||
\param synchronous If non-null create_app_meta_mime() waits until the
|
\param synchronous If non-null create_app_meta_mime() waits until the
|
||||||
operation is finished, otherwise it returns immediately and the
|
operation is finished, otherwise it returns immediately and the
|
||||||
operation is done asynchronously.
|
operation is done asynchronously.
|
||||||
@@ -129,8 +131,9 @@ status_t
|
|||||||
create_app_meta_mime(const char *path, int recursive, int synchronous,
|
create_app_meta_mime(const char *path, int recursive, int synchronous,
|
||||||
int force)
|
int force)
|
||||||
{
|
{
|
||||||
// If path is NULL, we are recursive, otherwise no.
|
// Force recursion when given a NULL path
|
||||||
recursive = !path;
|
if (!path)
|
||||||
|
recursive = true;
|
||||||
|
|
||||||
return do_mime_update(B_REG_MIME_CREATE_APP_META_MIME, path, recursive,
|
return do_mime_update(B_REG_MIME_CREATE_APP_META_MIME, path, recursive,
|
||||||
synchronous, force);
|
synchronous, force);
|
||||||
|
|||||||
Reference in New Issue
Block a user