chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
install: treat non-existent directory as empty
[elogind.git]
/
src
/
shared
/
install.c
diff --git
a/src/shared/install.c
b/src/shared/install.c
index 1a69337f5aef8c1d338a6c7a616b295e4434ca8b..0d38bccd7220061ce8813faf3f03c1cb404f5b3a 100644
(file)
--- a/
src/shared/install.c
+++ b/
src/shared/install.c
@@
-524,8
+524,11
@@
static int find_symlinks(
assert(same_name_link);
fd = open(config_path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW);
assert(same_name_link);
fd = open(config_path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW);
- if (fd < 0)
+ if (fd < 0) {
+ if (errno == ENOENT)
+ return 0;
return -errno;
return -errno;
+ }
/* This takes possession of fd and closes it */
return find_symlinks_fd(name, fd, config_path, config_path, same_name_link);
/* This takes possession of fd and closes it */
return find_symlinks_fd(name, fd, config_path, config_path, same_name_link);