aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/memline.c')
-rw-r--r--src/nvim/memline.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index f324651e8b..26757d6ed1 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -1260,11 +1260,10 @@ int recover_names(char *fname, bool do_list, list_T *ret_list, int nr, char **fn
#ifdef HAVE_READLINK
// Expand symlink in the file name, because the swapfile is created
// with the actual file instead of with the symlink.
- if (resolve_symlink(fname, fname_buf) == OK) {
- fname_res = fname_buf;
- } else
-#endif
+ fname_res = (resolve_symlink(fname, fname_buf) == OK) ? fname_buf : fname;
+#else
fname_res = fname;
+#endif
}
if (do_list) {