diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c index 979c9f872f0..b5e9318c10b 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -3951,7 +3951,8 @@ init_buffer () | |||
| 3951 | 3951 | ||
| 3952 | /* If PWD is accurate, use it instead of calling getwd. This is faster | 3952 | /* If PWD is accurate, use it instead of calling getwd. This is faster |
| 3953 | when PWD is right, and may avoid a fatal error. */ | 3953 | when PWD is right, and may avoid a fatal error. */ |
| 3954 | if ((pwd = getenv ("PWD")) != 0 && IS_DIRECTORY_SEP (*pwd) | 3954 | if ((pwd = getenv ("PWD")) != 0 |
| 3955 | && (IS_DIRECTORY_SEP (*pwd) || (*pwd && IS_DEVICE_SEP (pwd[1]))) | ||
| 3955 | && stat (pwd, &pwdstat) == 0 | 3956 | && stat (pwd, &pwdstat) == 0 |
| 3956 | && stat (".", &dotstat) == 0 | 3957 | && stat (".", &dotstat) == 0 |
| 3957 | && dotstat.st_ino == pwdstat.st_ino | 3958 | && dotstat.st_ino == pwdstat.st_ino |