mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Make vim startup faster
It appears that GetFileAttributes(u"\\etc\\passwd") can take two seconds on Windows 10 at unpredictable times for reasons which are mysterious to me. Let's try avoiding that path entirely and pray to Microsoft it works
This commit is contained in:
parent
deb5e07b5a
commit
a5c0189bf6
5 changed files with 25 additions and 15 deletions
5
third_party/musl/pwd.c
vendored
5
third_party/musl/pwd.c
vendored
|
@ -91,8 +91,9 @@ __fopen_passwd(void)
|
|||
{
|
||||
FILE *f;
|
||||
char *s;
|
||||
// MacOS has a fake /etc/passwd file without any user details.
|
||||
if (!IsXnu() && (f = fopen("/etc/passwd", "rbe")))
|
||||
// MacOS has a fake /etc/passwd file without any user details
|
||||
// GetFileAttributes(u"\\etc\\passwd") takes 2 seconds sometimes
|
||||
if (!IsXnu() && !IsWindows() && (f = fopen("/etc/passwd", "rbe")))
|
||||
return f;
|
||||
if (!(s = __create_synthetic_passwd_file()))
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue