From: Orgad Shaneh <orgads@gmail.com>
To: git@vger.kernel.org
Cc: Orgad Shaneh <orgads@gmail.com>
Subject: [PATCH] Fix path normalization for SMB shares
Date: Wed, 5 Sep 2012 14:28:27 +0300 [thread overview]
Message-ID: <1346844507-22998-1-git-send-email-orgads@gmail.com> (raw)
SMB shared are accessed using //server/share/directory...
notation.
normalize_path_copy used to leave only a single slash, which
invalidated the path.
Fix suggested by Nguyen Thai Ngoc Duy
Signed-off-by: Orgad Shaneh <orgads@gmail.com>
---
path.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/path.c b/path.c
index 66acd24..6cd9c0b 100644
--- a/path.c
+++ b/path.c
@@ -503,6 +503,12 @@ int normalize_path_copy(char *dst, const char *src)
*dst++ = *src++;
*dst++ = *src++;
}
+#ifdef WIN32
+ else if (is_dir_sep(src[0]) && is_dir_sep(src[1])) {
+ *dst++ = '/';
+ src++;
+ }
+#endif
dst0 = dst;
if (is_dir_sep(*src)) {
--
1.7.10.4
reply other threads:[~2012-09-05 11:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1346844507-22998-1-git-send-email-orgads@gmail.com \
--to=orgads@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).