Linux file watcher: initialization bug fix

This commit is contained in:
Roman Shevchenko
2012-07-17 19:11:08 +02:00
parent a0b3975b19
commit 7934a35d76
3 changed files with 1 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -217,7 +217,7 @@ static void rm_watch(int wd, bool update_parent) {
static int walk_tree(const char* path, watch_node* parent, bool recursive) {
DIR* dir;
DIR* dir = NULL;
if (recursive) {
if ((dir = opendir(path)) == NULL) {
if (errno == EACCES || errno == ENOENT) {