File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1795,7 +1795,7 @@ write_viminfo(file, forceit)
17951795 struct stat st_old ; /* mch_stat() of existing viminfo file */
17961796#endif
17971797#ifdef WIN3264
1798- long perm = -1 ;
1798+ int hidden = FALSE ;
17991799#endif
18001800
18011801 if (no_viminfo ())
@@ -1858,7 +1858,7 @@ write_viminfo(file, forceit)
18581858#endif
18591859#ifdef WIN3264
18601860 /* Get the file attributes of the existing viminfo file. */
1861- perm = mch_getperm (fname );
1861+ hidden = mch_ishidden (fname );
18621862#endif
18631863
18641864 /*
@@ -2033,7 +2033,7 @@ write_viminfo(file, forceit)
20332033
20342034#ifdef WIN3264
20352035 /* If the viminfo file was hidden then also hide the new file. */
2036- if (perm > 0 && ( perm & FILE_ATTRIBUTE_HIDDEN ) )
2036+ if (hidden )
20372037 mch_hide (fname );
20382038#endif
20392039 }
Original file line number Diff line number Diff line change @@ -3097,6 +3097,20 @@ mch_hide(char_u *name)
30973097 win32_setattrs (name , attrs );
30983098}
30993099
3100+ /*
3101+ * Return TRUE if file "name" exists and is hidden.
3102+ */
3103+ int
3104+ mch_ishidden (char_u * name )
3105+ {
3106+ int f = win32_getattrs (name );
3107+
3108+ if (f == -1 )
3109+ return FALSE; /* file does not exist at all */
3110+
3111+ return (f & FILE_ATTRIBUTE_HIDDEN ) != 0 ;
3112+ }
3113+
31003114/*
31013115 * return TRUE if "name" is a directory
31023116 * return FALSE if "name" is not a directory or upon error
Original file line number Diff line number Diff line change @@ -741,6 +741,8 @@ static char *(features[]) =
741741
742742static int included_patches [] =
743743{ /* Add new patch number below this line */
744+ /**/
745+ 906 ,
744746/**/
745747 905 ,
746748/**/
You can’t perform that action at this time.
0 commit comments