aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/transport/transport-testing.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index 87ce704232..8919aa5550 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -611,7 +611,25 @@ extract_filename (const char *file)
char *backup = pch;
char *filename = NULL;
char *res;
-
+#if WINDOWS
+ if ((strlen (pch) >= 3) && pch[1] == ':')
+ {
+ if (NULL != strstr (pch, "\\"))
+ {
+ pch = strtok (pch, "\\");
+ while (pch != NULL)
+ {
+ pch = strtok (NULL, "\\");
+ if (pch != NULL)
+ filename = pch;
+ }
+ }
+ }
+ if (filename != NULL)
+ pch = filename; /* If we miss the next condition, filename = pch will
+ * not harm us.
+ */
+#endif
if (NULL != strstr (pch, "/"))
{
pch = strtok (pch, "/");