Differences From:
File
src/file.c
part of check-in
[c841af0d50]
- Fixed error with absolute pathnames when opening a repo on Win32
by
mjanssen on
2007-09-24 19:42:15.
[view]
To:
File
src/file.c
part of check-in
[af3a751841]
- When checking for win32 absolute paths, I added a check to make sure we don't overstep the bounds of a string
by
jnc on
2007-09-25 00:17:39.
[view]
@@ -183,9 +183,10 @@
** Remove all /./ path elements.
** Convert /A/../ to just /
*/
void file_canonical_name(const char *zOrigName, Blob *pOut){
- if( zOrigName[0]=='/' || (zOrigName[1]==':' && zOrigName[2]=='\\') ){
+ if( zOrigName[0]=='/'
+ || (strlen(zOrigName)>3 && zOrigName[1]==':' && zOrigName[2]=='\\') ){
blob_set(pOut, zOrigName);
blob_materialize(pOut);
}else{
char zPwd[2000];