diff options
Diffstat (limited to 'src/transport/transport-testing.c')
-rw-r--r-- | src/transport/transport-testing.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c index 87ce70423..8919aa555 100644 --- a/src/transport/transport-testing.c +++ b/src/transport/transport-testing.c | |||
@@ -611,7 +611,25 @@ extract_filename (const char *file) | |||
611 | char *backup = pch; | 611 | char *backup = pch; |
612 | char *filename = NULL; | 612 | char *filename = NULL; |
613 | char *res; | 613 | char *res; |
614 | 614 | #if WINDOWS | |
615 | if ((strlen (pch) >= 3) && pch[1] == ':') | ||
616 | { | ||
617 | if (NULL != strstr (pch, "\\")) | ||
618 | { | ||
619 | pch = strtok (pch, "\\"); | ||
620 | while (pch != NULL) | ||
621 | { | ||
622 | pch = strtok (NULL, "\\"); | ||
623 | if (pch != NULL) | ||
624 | filename = pch; | ||
625 | } | ||
626 | } | ||
627 | } | ||
628 | if (filename != NULL) | ||
629 | pch = filename; /* If we miss the next condition, filename = pch will | ||
630 | * not harm us. | ||
631 | */ | ||
632 | #endif | ||
615 | if (NULL != strstr (pch, "/")) | 633 | if (NULL != strstr (pch, "/")) |
616 | { | 634 | { |
617 | pch = strtok (pch, "/"); | 635 | pch = strtok (pch, "/"); |