File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -512,13 +512,16 @@ test_server_selection_logic_cb (bson_t *test)
512
512
* Given a parent directory and filename, compile a full path to
513
513
* the child file.
514
514
*
515
+ * "dst" receives the joined path, delimited by "/" even on Windows.
516
+ *
515
517
*-----------------------------------------------------------------------
516
518
*/
517
519
void
518
520
assemble_path (const char * parent_path ,
519
521
const char * child_name ,
520
522
char * dst /* OUT */ )
521
523
{
524
+ char * p ;
522
525
int path_len = (int ) strlen (parent_path );
523
526
int name_len = (int ) strlen (child_name );
524
527
@@ -528,6 +531,12 @@ assemble_path (const char *parent_path,
528
531
strncat (dst , parent_path , path_len );
529
532
strncat (dst , "/" , 1 );
530
533
strncat (dst , child_name , name_len );
534
+
535
+ for (p = dst ; * p ; ++ p ) {
536
+ if (* p == '\\' ) {
537
+ * p = '/' ;
538
+ }
539
+ }
531
540
}
532
541
533
542
/*
You can’t perform that action at this time.
0 commit comments