mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
vim-patch:9.1.1141: Misplaced comment in readfile()
Problem: Misplaced comment in readfile().
(after v9.1.1139)
Solution: Move the comment above S_ISDIR().
(zeertzjq)
closes: vim/vim#16714
b8989fb860
This commit is contained in:
@@ -355,8 +355,6 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip,
|
||||
|
||||
if (!read_stdin && fname != NULL) {
|
||||
perm = os_getperm(fname);
|
||||
// On Unix it is possible to read a directory, so we have to
|
||||
// check for it before os_open().
|
||||
}
|
||||
|
||||
#ifdef OPEN_CHR_FILES
|
||||
@@ -372,6 +370,8 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip,
|
||||
&& !(IS_CHR_DEV(perm, fname))
|
||||
// ... or a character special file named /dev/fd/<n>
|
||||
) {
|
||||
// On Unix it is possible to read a directory, so we have to
|
||||
// check for it before os_open().
|
||||
if (S_ISDIR(perm)) {
|
||||
if (!silent) {
|
||||
filemess(curbuf, fname, _(msg_is_a_directory));
|
||||
|
Reference in New Issue
Block a user