Thanks for the patch! It would be good to get this in the upcoming release. Some complaints below. On Mon, 2017-07-24 at 16:34 +0200, Vadim Troshchinskiy wrote: > diff --git a/src/pulsecore/conf-parser.c b/src/pulsecore/conf-parser.c > index 60345adf..a08ff9e8 100644 > --- a/src/pulsecore/conf-parser.c > +++ b/src/pulsecore/conf-parser.c > @@ -218,6 +218,35 @@ finish: > Â Â Â Â Â Â Â Â fclose(f); > Â > Â Â Â Â if (use_dot_d) { > +#ifdef OS_IS_WIN32 > +Â Â Â Â Â Â Â char *dir_name = pa_sprintf_malloc("%s.d", filename); > +Â Â Â Â Â Â Â char *pattern = pa_sprintf_malloc("%s\\*.*", dir_name); The scandir branch uses "*.conf" as the pattern, shouldn't you use the same pattern? > +Â Â Â Â Â Â Â HANDLE fh; > +Â Â Â Â Â Â Â WIN32_FIND_DATA wfd; > + > +Â Â Â Â Â Â Â fh = FindFirstFile(pattern, &wfd); > +Â Â Â Â Â Â Â if ( fh != INVALID_HANDLE_VALUE ) { Nitpicking about coding style: too many spaces sprinkled here. Use this style: if (condition) { > +Â Â Â Â Â Â Â Â Â Â Â do { > +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if( ! (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ) { More space problems. if (!(flags & flag)) { > +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â char *filename2 = pa_sprintf_malloc("%s\\%s", dir_name, wfd.cFileName); > +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pa_config_parse(filename2, NULL, t, proplist, false, userdata); > +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pa_xfree(filename2); > +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â } > +Â Â Â Â Â Â Â Â Â Â Â } while(FindNextFile(fh, &wfd)); } while (condition); > +Â Â Â Â Â Â Â Â Â Â Â FindClose(fh); > +Â Â Â Â Â Â Â } else { > +Â Â Â Â Â Â Â Â Â Â Â DWORD err = GetLastError(); > + > +Â Â Â Â Â Â Â Â Â Â Â if ( err == ERROR_PATH_NOT_FOUND ) { > +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pa_log_debug("%s does not exist, ignoring.", dir_name); This could also happen if the directory is empty, or if dir_name exists, but is not a directory. A more accurate log message would be: "Pattern %s\\*.conf did not match any files, ignoring." > +Â Â Â Â Â Â Â Â Â Â Â } else { > +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pa_log_warn("FindFirstFile failed %s with error %d, ignoring", err, pattern); Did the compiler not complain about this? You are passing an integer to a %s and a string to a %d. Does Windows have some API to convert the error code to some human- readable string? It's frustrating to get an error message that only provides a number as a hint about what went wrong. -- Tanu https://www.patreon.com/tanuk