projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8120ee2
)
copy: return the right error when we can't open a file
author
Lennart Poettering
<lennart@poettering.net>
Fri, 29 Apr 2016 17:42:07 +0000
(19:42 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 2 May 2016 09:15:30 +0000
(11:15 +0200)
src/basic/copy.c
patch
|
blob
|
history
diff --git
a/src/basic/copy.c
b/src/basic/copy.c
index
3001234
..
c2baef6
100644
(file)
--- a/
src/basic/copy.c
+++ b/
src/basic/copy.c
@@
-305,6
+305,8
@@
static int fd_copy_directory(
fdf = openat(df, from, O_RDONLY|O_DIRECTORY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW);
else
fdf = fcntl(df, F_DUPFD_CLOEXEC, 3);
+ if (fdf < 0)
+ return -errno;
d = fdopendir(fdf);
if (!d)