X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=osl.c;h=0b14447b296c736ecaed7d831e0801a45c99296f;hp=6e3eeca65db2a07d308f0fd2a30995867b29dbc9;hb=a48537c245151810e33b7ab9915b5f0b9ea9e75f;hpb=15d21005beb3b173ba9909e522782201fdf0d5b8 diff --git a/osl.c b/osl.c index 6e3eeca6..0b14447b 100644 --- a/osl.c +++ b/osl.c @@ -211,9 +211,10 @@ out: * \param func The function to call for each entry. * \param private_data Pointer to an arbitrary data structure. * - * For each regular file in \a dirname, the supplied function \a func is + * For each regular file under \a dirname, the supplied function \a func is * called. The full path of the regular file and the \a private_data pointer - * are passed to \a func. + * are passed to \a func. Directories for which the calling process has no + * permissions to change to are silently ignored. * * \return On success, 1 is returned. Otherwise, this function returns a * negative value which indicates the kind of the error. @@ -226,7 +227,7 @@ int for_each_file_in_dir(const char *dirname, int cwd_fd, ret2, ret = para_opendir(dirname, &dir, &cwd_fd); if (ret < 0) - return ret; + return ret == -E_CHDIR_PERM? 1 : ret; /* scan cwd recursively */ while ((entry = readdir(dir))) { mode_t m;