浏览代码

Try to open file to see access errors on the status bar

master
lostd 10 年前
父节点
当前提交
a606073296
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. +7
    -1
      noice.c

+ 7
- 1
noice.c 查看文件

@@ -569,7 +569,7 @@ browse(const char *ipath, const char *ifilter)
DIR *dirp;
struct entry *dents;
int i, n, cur;
int r, ret;
int r, ret, fd;
char *path = xrealpath(ipath);
char *filter = xstrdup(ifilter);
regex_t filter_re;
@@ -683,6 +683,12 @@ nochange:
DPRINTF_S(name);

/* Get path info */
fd = openat(dirfd(dirp), name, O_RDONLY | O_NONBLOCK);
if (fd == -1) {
printwarn();
goto nochange;
}
close(fd);
r = fstatat(dirfd(dirp), name, &sb, 0);
if (r == -1) {
printwarn();


正在加载...
取消
保存