diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2013-02-28 14:01:33 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2013-02-28 14:01:33 +0000 |
commit | 8d0b8f07f0dc85f5f8f3515ac265f9576e9dfc94 (patch) | |
tree | 111465ebe830fa457858d1d22c0bda00974456af /src | |
parent | 47e6363f9c25444103604d0a1e60211ea1ef4c36 (diff) |
Fixed \\machine\dir structure build on Windows (TomZ)
Diffstat (limited to 'src')
-rw-r--r-- | src/htscore.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/htscore.c b/src/htscore.c index 6e2b198..be715ad 100644 --- a/src/htscore.c +++ b/src/htscore.c @@ -2484,7 +2484,17 @@ HTSEXT_API int structcheck(const char* path) { i++; } } else if (file[0] == PATH_SEPARATOR && file[1] == PATH_SEPARATOR) { /* \\mch */ + int j; i+= 2; + // skip machine and first dir (share) or we'll have troubles (TomZ) + for(j = 0 ; j < 2 ; j++) { + // skip segment + for( ; file[i] != '\0' && file[i] != PATH_SEPARATOR ; i++) ; + // skip final separator + if (file[i] == PATH_SEPARATOR) { /* f:\ */ + i++; + } + } } #endif @@ -2580,7 +2590,17 @@ HTSEXT_API int structcheck_utf8(const char* path) { i++; } } else if (file[0] == PATH_SEPARATOR && file[1] == PATH_SEPARATOR) { /* \\mch */ + int j; i+= 2; + // skip machine and first dir (share) or we'll have troubles (TomZ) + for(j = 0 ; j < 2 ; j++) { + // skip segment + for( ; file[i] != '\0' && file[i] != PATH_SEPARATOR ; i++) ; + // skip final separator + if (file[i] == PATH_SEPARATOR) { /* f:\ */ + i++; + } + } } #endif |