{"thread":{"id":"31444","subject":"[PATCH] Fix path normalization for SMB shares","startedAt":"2012-09-05T11:28:27Z","lastAt":"2012-09-05T11:28:27Z","messageCount":1,"participants":["Orgad Shaneh"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"198373","messageId":"1346844507-22998-1-git-send-email-orgads@gmail.com","threadId":"31444","inReplyTo":null,"subject":"[PATCH] Fix path normalization for SMB shares","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2012-09-05T11:28:27Z","receivedAt":"2012-09-05T11:28:27Z","isPatch":true,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"SMB shared are accessed using //server/share/directory...\nnotation.\n\nnormalize_path_copy used to leave only a single slash, which\ninvalidated the path.\n\nFix suggested by Nguyen Thai Ngoc Duy\n\nSigned-off-by: Orgad Shaneh <orgads@gmail.com>\n---\n path.c |    6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/path.c b/path.c\nindex 66acd24..6cd9c0b 100644\n--- a/path.c\n+++ b/path.c\n@@ -503,6 +503,12 @@ int normalize_path_copy(char *dst, const char *src)\n \t\t*dst++ = *src++;\n \t\t*dst++ = *src++;\n \t}\n+#ifdef WIN32\n+\telse if (is_dir_sep(src[0]) && is_dir_sep(src[1])) {\n+\t\t*dst++ = '/';\n+\t\tsrc++;\n+\t}\n+#endif\n \tdst0 = dst;\n \n \tif (is_dir_sep(*src)) {\n-- \n1.7.10.4\n"}]}