summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-02-07 22:01:03 +0000
committerBram Moolenaar <Bram@vim.org>2005-02-07 22:01:03 +0000
commit7c62692d430af7313d52257895cfa8298676b6f6 (patch)
treee29d1348de49aa33b8423ed2290002e39c7a0d1c /src/ex_cmds2.c
parentf97ca8f0665f4604f7778ea709573d920ab83240 (diff)
updated for version 7.0049
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r--src/ex_cmds2.c11
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;