File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -387,21 +387,13 @@ mch_FullName(
387387 int
388388mch_isFullName (char_u * fname )
389389{
390- // WinNT and later can use _MAX_PATH wide characters for a pathname, which
391- // means that the maximum pathname is _MAX_PATH * 3 bytes when 'enc' is
392- // UTF-8.
393- char szName [_MAX_PATH * 3 + 1 ];
394-
395- // A name like "d:/foo" and "//server/share" is absolute
396- if ((fname [0 ] && fname [1 ] == ':' && (fname [2 ] == '/' || fname [2 ] == '\\' ))
397- || (fname [0 ] == fname [1 ] && (fname [0 ] == '/' || fname [0 ] == '\\' )))
398- return TRUE;
399-
400- // A name that can't be made absolute probably isn't absolute.
401- if (mch_FullName (fname , (char_u * )szName , sizeof (szName ) - 1 , FALSE) == FAIL )
402- return FALSE;
403-
404- return pathcmp ((const char * )fname , (const char * )szName , -1 ) == 0 ;
390+ // A name like "d:/foo" and "//server/share" is absolute. "d:foo" is not.
391+ // Another way to check is to use mch_FullName() and see if the result is
392+ // the same as the name or mch_FullName() fails. However, this has quite a
393+ // bit of overhead, so let's not do that.
394+ return ((ASCII_ISALPHA (fname [0 ]) && fname [1 ] == ':'
395+ && (fname [2 ] == '/' || fname [2 ] == '\\' ))
396+ || (fname [0 ] == fname [1 ] && (fname [0 ] == '/' || fname [0 ] == '\\' )));
405397}
406398
407399/*
Original file line number Diff line number Diff line change @@ -750,6 +750,8 @@ static char *(features[]) =
750750
751751static int included_patches [] =
752752{ /* Add new patch number below this line */
753+ /**/
754+ 2129 ,
753755/**/
754756 2128 ,
755757/**/
You can’t perform that action at this time.
0 commit comments