From 917aafaa99163e731d76b471e9975a8947a35a60 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 5 Aug 2011 21:16:38 +0000 Subject: [PATCH] LRN: 0006-Use-plibc-to-convert-dir-separators.patch --- src/fs/fs_file_information.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fs/fs_file_information.c b/src/fs/fs_file_information.c index e920bf46b..62ae285d8 100644 --- a/src/fs/fs_file_information.c +++ b/src/fs/fs_file_information.c @@ -149,6 +149,9 @@ GNUNET_FS_file_information_create_from_file (struct GNUNET_FS_Handle *h, struct GNUNET_FS_FileInformation *ret; const char *fn; const char *ss; +#if WINDOWS + char fn_conv[MAX_PATH]; +#endif if (0 != STAT (filename, &sbuf)) { @@ -176,7 +179,12 @@ GNUNET_FS_file_information_create_from_file (struct GNUNET_FS_Handle *h, return NULL; ret->h = h; ret->filename = GNUNET_strdup (filename); +#if !WINDOWS fn = filename; +#else + plibc_conv_to_win_path (filename, fn_conv); + fn = fn_conv; +#endif while (NULL != (ss = strstr (fn, DIR_SEPARATOR_STR))) fn = ss + 1; -- 2.25.1