diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-02-07 22:01:03 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-02-07 22:01:03 +0000 |
commit | 7c62692d430af7313d52257895cfa8298676b6f6 (patch) | |
tree | e29d1348de49aa33b8423ed2290002e39c7a0d1c /src/ex_cmds2.c | |
parent | f97ca8f0665f4604f7778ea709573d920ab83240 (diff) |
updated for version 7.0049
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r-- | src/ex_cmds2.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 82557febb7..6c8ece95b1 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -2339,11 +2339,12 @@ do_source(fname, check_other, is_vimrc) if (SCRIPT_NAME(current_SID) != NULL && ( # ifdef UNIX - /* compare dev/ino when possible, it catches symbolic - * links */ - (stat_ok && SCRIPT_DEV(current_SID) != -1) - ? (SCRIPT_DEV(current_SID) == st.st_dev - && SCRIPT_INO(current_SID) == st.st_ino) : + /* Compare dev/ino when possible, it catches symbolic + * links. Also compare file names, the inode may change + * when the file was edited. */ + ((stat_ok && SCRIPT_DEV(current_SID) != -1) + && (SCRIPT_DEV(current_SID) == st.st_dev + && SCRIPT_INO(current_SID) == st.st_ino)) || # endif fnamecmp(SCRIPT_NAME(current_SID), fname_exp) == 0)) break; |