mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 11:53:49 +07:00
[platform] makes fsnotifier look for '/proc/mounts' if '/etc/mtab' is missing (IDEA-198080)
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION "20160218.1348"
|
#define VERSION "20181217.1910"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@@ -411,6 +411,9 @@ static bool is_watchable(const char* fs) {
|
|||||||
|
|
||||||
static array* unwatchable_mounts() {
|
static array* unwatchable_mounts() {
|
||||||
FILE* mtab = setmntent(_PATH_MOUNTED, "r");
|
FILE* mtab = setmntent(_PATH_MOUNTED, "r");
|
||||||
|
if (mtab == NULL && errno == ENOENT) {
|
||||||
|
mtab = setmntent("/proc/mounts", "r");
|
||||||
|
}
|
||||||
if (mtab == NULL) {
|
if (mtab == NULL) {
|
||||||
userlog(LOG_ERR, "cannot open " _PATH_MOUNTED);
|
userlog(LOG_ERR, "cannot open " _PATH_MOUNTED);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user