forked from aniani/vim
patch 8.2.0888: readdirex() returns size -2 for a directory
Problem: Readdirex() returns size -2 for a directory. Solution: Add missing "else". (Ken Takata, closes #6185)
This commit is contained in:
@@ -4575,7 +4575,7 @@ create_readdirex_item(char_u *path, char_u *name)
|
||||
if (S_ISDIR(st.st_mode))
|
||||
size = 0;
|
||||
// non-perfect check for overflow
|
||||
if ((off_T)size != (off_T)st.st_size)
|
||||
else if ((off_T)size != (off_T)st.st_size)
|
||||
size = -2;
|
||||
if (dict_add_number(item, "size", size) == FAIL)
|
||||
goto theend;
|
||||
|
Reference in New Issue
Block a user