We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d3f10e commit b57df69Copy full SHA for b57df69
plugins/out_file/file.c
@@ -406,11 +406,19 @@ static int mkpath(struct flb_output_instance *ins, const char *dir)
406
return -1;
407
}
408
409
+ p = parent_path;
410
+
411
+ /* Skip the drive letter if present (e.g., "C:") */
412
+ if (p[1] == ':') {
413
+ p += 2;
414
+ }
415
416
/* Normalize all forward slashes to backslashes */
- for (p = parent_path; *p; ++p) {
417
+ while (*p != '\0') {
418
if (*p == '/') {
419
*p = '\\';
420
421
+ p++;
422
423
424
flb_plg_debug(ins, "starting to create directory %s", parent_path);
0 commit comments